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.1 by root, Sat Jun 27 17:59:10 2015 UTC vs.
Revision 1.2 by root, Sat Jun 27 19:32:14 2015 UTC

5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 use Coro::Multicore; 7 use Coro::Multicore;
8 8
9=head1 DESCRIPTION 9=head1 DESCRIPTION
10
11While L<Coro> threads (unlike ithreads) provide real threads similar to
12pthreads, python threads and so on, they do not run in parallel to eahc
13other even on machines with multiple CPUs or multiple CPU cores.
14
15This module lifts this restriction under two very specific but useful
16conditions: firstly, the coro thread executes in XS code and does not
17touch any perl data structures, and secondly, the XS code is specially
18prepared to allow this.
19
20This means that, when you call an XS function of a module prepared for it,
21this XS function can execute in parallel to any other Coro threads.
22
23The mechanism to support this is easily added to existing modules and is
24independent of L<Coro> or L<Coro::Multicore>, and therefore could be used,
25without changes, with other, similar, modules, or even the perl core,
26should it gain real thread support anytime soon. SEe L<TODO> for more info
27on how to prepare a module to allow parallel execution.
10 28
11=over 4 29=over 4
12 30
13=cut 31=cut
14 32

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines