Elizabeth Mattijsen wrote:
At 10:00 -0800 1/12/04, Stas Bekman wrote:

Elizabeth Mattijsen wrote:

Oh? That's news to me. I was under the impression the problem only existed on Win32.
Could you show me how to reproduce the problem on *nix?


% perl-5.8.3-ithread -le 'use threads; threads->new(sub { sleep 1})->detach for 1..1'
A thread exited while 2 threads were running.


Ah. That! That is considered to be correct behaviour (unless you're referring to the "2" instead of "1").

What's correct about it? I've detached the threads and shouldn't get any errors.


Besides, I find it worrying that we have a flurry of workaround modules instead of trying to fix the core. Of course it's better than nothing, but it all should really be fixed in the core.


There is another bug with detach() in Win32 which can cause crashes. It was decided on p5p that it would _not_ get fixed for 5.8.3. So, that means at least 3 - 4 months of Windows users running into this. I have no doubt it will get fixed (actually, I'm assuming 5.8.4 in the source of Thread::Detach). Until then, Thread::Detach is a workaround if you don't want to change your source.

So I should remember to try to avoid using detach in my code. Thanks for the heads up, Liz. Luckily in mp2 we don't quite need this feature.



__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to