NAME
threads - Perl extension allowing use of interpreter based threads from perl
SYNOPSIS
use threads;
sub start_thread {
print "Thread started\n";
}
my $thread = threads->new("start_thread","argument");
$thread->new(sub { print "I am a thread"},"argument");
$thread->join();
$thread->detach();
my $thread = threads->self();
$thread->tid();
DESCRIPTION
Perl 5.6 has something called interpreter threads, interpreter threads are built on MULTIPLICITY and allows for several different perl interpreters to run in different threads. This has been used in win32 perl to fake forks, it has also been avaible to people embedding perl.
I came across a situation where I needed a global cache of data and multiple threads working on a set of data using the cache for non changing data, so I decided to expose threadss to the perl level, that is were we realy need them.
threads are a bit different from what people normall thing of as threads, these threads do not share any memory at all, in the future it will be possible to explicitly share data.
please join perl-ithreads@perl.org for more information
TODO
AUTHOR and COPYRIGHT
Artur Bergman <lt>artur at contiller.se<gt>
threads is released under the same license as Perl
Thanks to
Richard Soderberg <lt>rs at crystalflame.net<gt> Helping me out tons, trying to find reasons for races and other wierd bugs!
Simon Cozens <lt>simon at brecon.co.uk<gt> Being there to answer zillions of annoying questions
Rocco Caputo <lt>troc at netrus.net<gt>
Vipul Ved Prakash <lt>mail at vipul.net<gt> Helping with debugging.
BUGS
Plenty of bugs!