Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grinnz/mojo-ioloop-subprocess-sereal
Mojo::IOLoop::Subprocess::Sereal - Subprocesses with Sereal
https://github.com/grinnz/mojo-ioloop-subprocess-sereal
Last synced: 5 days ago
JSON representation
Mojo::IOLoop::Subprocess::Sereal - Subprocesses with Sereal
- Host: GitHub
- URL: https://github.com/grinnz/mojo-ioloop-subprocess-sereal
- Owner: Grinnz
- License: other
- Created: 2016-09-19T20:15:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-06-16T03:59:29.000Z (over 3 years ago)
- Last Synced: 2024-11-13T05:43:34.272Z (about 2 months ago)
- Language: Perl
- Homepage: https://metacpan.org/pod/Mojo::IOLoop::Subprocess::Sereal
- Size: 39.1 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.pod
- Changelog: Changes
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
=pod
=encoding utf8
=head1 NAME
Mojo::IOLoop::Subprocess::Sereal - Subprocesses with Sereal
=head1 SYNOPSIS
use Mojo::IOLoop::Subprocess::Sereal;
# Operation that would block the event loop for 5 seconds
my $subprocess = Mojo::IOLoop->$_subprocess(
sub {
my $subprocess = shift;
sleep 5;
return '♥', 'Mojolicious';
},
sub {
my ($subprocess, $err, @results) = @_;
say "I $results[0] $results[1]!";
}
);# Start event loop if necessary
Mojo::IOLoop->start unless Mojo::IOLoop->is_running;=head1 DESCRIPTION
L provides a L"$_subprocess"> method which
works as a drop-in replacement for L while using
L for data serialization. L is faster than L and
supports serialization of more reference types such as C. The
L is supported to control
serialization of blessed objects.See L for a role to apply L
data serialization to any L.=head1 EXPORTS
L exports the following variable by default.
=head2 $_subprocess
my $subprocess = Mojo::IOLoop->$_subprocess(sub {...}, sub {...});
my $subprocess = Mojo::IOLoop->$_subprocess;
my $subprocess = $loop->$_subprocess(sub {...}, sub {...});Build L object to perform computationally expensive
operations in subprocesses, without blocking the event loop. Composes and calls
L to use L for
data serialization. If arguments are provided, they will be used to call
L.=head1 BUGS
Report any issues on the public bugtracker.
=head1 AUTHOR
Dan Book
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2016 by Dan Book.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
=head1 SEE ALSO
L, L, L
=cut