in reply to Re: Alarms with ActivePerl do not work properly (small modification)
in thread Alarms with ActivePerl do not work properly
I also think that the emulation can be fixed. Just use a select/sysread loop, which gives you lots of opportunities to be interrupted. Yes, it is a busy wait. But if you only do it when there is an outstanding alarm, I think it is a reasonable tradeoff.
In fact it is even possible to make that fix in pure Perl. All you have to do is tie the filehandle to an implementation that has a READLINE that does the select/sysread loop and returns when it completes a line of text. (Don't forget to strip out "\r".)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Alarms with ActivePerl do not work properly (small modification)
by BrowserUk (Patriarch) on Jan 13, 2011 at 01:07 UTC | |
by tilly (Archbishop) on Jan 13, 2011 at 06:33 UTC | |
by BrowserUk (Patriarch) on Jan 13, 2011 at 07:12 UTC | |
by Corion (Patriarch) on Jan 13, 2011 at 18:01 UTC |