Brian Raven wrote: > $Bill Luebkert <> wrote: > >>There is no alarm function on Win32, so if you're on UNIX you'll be >>fine. IO::Socket used to use alarm and was modified to use select >>for that reason. > > Not quite. The alarm function has been made to work on Win32 (I don't > know how, but it is unlikely to involve real signals),
The operative word here is 'work'. Just becasue there is an alarm function does not mean by an stretch of the imagination that it will do what you expect it to do based on what the UNIX alarm does. I haven't read the code, but I believe it requires you to be cycling the main program loop and in the case of blocking IO, I don't think that's the case for the poster. But feel free to experiment all you like and report your results. Win32 is a message passing system and hasn't a notion of async interruption of the code and restoration afterward. > but it won't be > much use in a multithreaded environment on UNIX either, as you can only > have one timer. Timing out socket I/O is better done with IO::Select, as > $Bill implies, irrespective of the number of threads. _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
