in reply to Re: Win32 and threads;
in thread Win32 and threads;
use strict; use warnings; use threads; my $thread_count = 0; for (1..5000) { threads->new(\&handle_thread,++$thread_count); } sleep 10; print "--Parent Quits --"; ###################### sub handle_thread { my $thread_count = shift; threads->self->detach; # so long parent print "You are thread number $thread_count \n"; sleep 3; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Win32 and threads;
by jammin2night (Initiate) on Jul 11, 2004 at 01:22 UTC | |
by jammin2night (Initiate) on Jul 11, 2004 at 15:09 UTC | |
by BrowserUk (Patriarch) on Jul 11, 2004 at 20:07 UTC | |
by pbeckingham (Parson) on Jul 11, 2004 at 20:22 UTC | |
by BrowserUk (Patriarch) on Jul 11, 2004 at 23:19 UTC |