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

Comparing cvsroot/Coro-Multicore/Multicore.pm (file contents):
Revision 1.11 by root, Wed Jul 29 18:36:33 2015 UTC vs.
Revision 1.12 by root, Thu Aug 11 20:56:33 2016 UTC

22 # blocking is safe in your own threads 22 # blocking is safe in your own threads
23 ... 23 ...
24 }; 24 };
25 25
26=head1 DESCRIPTION 26=head1 DESCRIPTION
27
28EXPERIMENTAL WARNING: This module is in its early stages of
29development. It's fine to try out, but it didn't receive the normal amount
30of testing and real-world usage that my other modules have gone through.
31 27
32While L<Coro> threads (unlike ithreads) provide real threads similar to 28While L<Coro> threads (unlike ithreads) provide real threads similar to
33pthreads, python threads and so on, they do not run in parallel to each 29pthreads, python threads and so on, they do not run in parallel to each
34other even on machines with multiple CPUs or multiple CPU cores. 30other even on machines with multiple CPUs or multiple CPU cores.
35 31
80deadlock. 76deadlock.
81 77
82=head2 USE IT IN THE MAIN PROGRAM 78=head2 USE IT IN THE MAIN PROGRAM
83 79
84One way to avoid this is to not run perlmulticore enabled functions 80One way to avoid this is to not run perlmulticore enabled functions
85in any callbacks. A simpler way to snure it works is to disable 81in any callbacks. A simpler way to ensure it works is to disable
86C<Coro::Multicore> thread switching in event loop callbacks, and enable it 82C<Coro::Multicore> thread switching in event loop callbacks, and enable it
87everywhere else. 83everywhere else.
88 84
89Therefore, if you control the event loop, as is usually the case when 85Therefore, if you control the event loop, as is usually the case when
90you write I<program> and not a I<module>, then you can enable C<Coro::Multicore> 86you write I<program> and not a I<module>, then you can enable C<Coro::Multicore>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines