ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro-Multicore/Multicore.pm
(Generate patch)

Comparing Coro-Multicore/Multicore.pm (file contents):
Revision 1.8 by root, Fri Jul 3 02:55:03 2015 UTC vs.
Revision 1.9 by root, Mon Jul 27 12:05:09 2015 UTC

2 2
3Coro::Multicore - make coro threads on multiple cores with specially supported modules 3Coro::Multicore - make coro threads on multiple cores with specially supported modules
4 4
5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 use Coro::Multicore; 7 # when you DO control the main event loop, e.g. in the main program
8 8
9 # or, if you want it disabled by default (e.g. to use it from a module) 9 use Coro::Multicore; # enable by default
10 use Coro::Multicore (); 10
11 Coro::Multicore::scoped_disable;
12 EV::loop; # or AnyEvent::Loop::run, Event::loop, AE::cv->recv, ...
13
14 # when you DO NOT control the event loop, e.g. in a module on CPAN
15
16 use Coro::Multicore (); # disable by default
17
18 async {
19 Coro::Multicore::scoped_enable;
20
21 # blocking is safe in your own threads
22 ...
23 };
11 24
12=head1 DESCRIPTION 25=head1 DESCRIPTION
13 26
14EXPERIMENTAL WARNING: This module is in its early stages of 27EXPERIMENTAL WARNING: This module is in its early stages of
15development. It's fine to try out, but it didn't receive the normal amount 28development. It's fine to try out, but it didn't receive the normal amount

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines