Re: is Event the best event loop module?

[email protected] (Nick Ing-Simmons)
Newsgroups perl.loop
Message-ID <[email protected]>
Uri Guttman <[email protected]> writes:
>>>>>> "DF" == Danny Faught <[email protected]> writes:
>
>
>  DF> It looks like your signal handler just sets a flag when it's invoked,
>  DF> which is the same way I do it.  This means that you depend on the event
>  DF> loop to wake up and check the flag.  But what happens if a signal comes
>  DF> in right before the poll/select call?  The signal won't wake it up.  
>
>are you doing your own signal handling in perl? if so, you should switch
>to event.pm. perl's signal handling is well known to be unsafe.

perl5.7.1+ has safe signal handling.

>
>the way to handle that properly is to check for any pending signals
>before you enter the select call (while blocking any from coming in) and
>then checking after the select returns. this can only be done correctly
>in C.
>
>uri
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.