On Thu, 25 Aug 2005, $Bill Luebkert wrote:
> >>win32 doesn't have signals and any that are implemented don't actually
> >>interrupt the receiving process.  I believe they just use simple message
> >>passing to fake it - so your mileage may vary.
> > 
> > My point was precisely that "they" have arranged that this idiom works 
> > under Windows.  Your mileage should not vary; my experience is that 
> > it always works.  
> 
> Which idiom is that ?  SIGALRM ?  or signals in general ?  or your
> eval example specifically ?

The use of an alarm to timeout an eval{} block definitely works.  I don't
know why it works, but it does.  I do get the impression that alarms are
handled in some special way by perl, because this idiom works on all
platforms we've tried it on (Linux, AIX, IRIX, MacOSX, Windows), even
though ordinary signal delivery to a threaded app isn't predictable (that
is, which thread gets the signal?) on some of those platforms.

This didn't work in ActiveState's perl 5.6.1, but as of the 5.8.0 release
it was working.  In any case, we use the technique widely in our
networking code and have found it to work reliably.

TomP

-------------------------------------------------------------------------
Tom Pollard                                       [EMAIL PROTECTED]
Schrodinger, Inc.                                    646-366-9555 x102
-------------------------------------------------------------------------


_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to