in reply to Re^2: Alarms with ActivePerl do not work properly
in thread Alarms with ActivePerl do not work properly
alarm "works" since (I think) 5.8. On Windows, it's simulated using a timer message (WM_TIMER), but I think that "unsafe signals" do not look at whether that timer message has been received. So an alarm call can only interrupt the Perl interpreter when it is in the runloop, and not when it spends time in XS (or a system call, or a database operation).
The above is from memory - a closer look at win32_alarm in win32.c will likely be enlightening. It seems that alarm() could be made to "work" with unsafe signals (as far as unsafe signals can ever be called to "work") by having the WM_TIMER message trigger a callback, just like SIG_ALRM would under some unixish OS.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Alarms with ActivePerl do not work properly
by BrowserUk (Patriarch) on Jan 13, 2011 at 09:41 UTC | |
|
Re^4: Alarms with ActivePerl do not work properly
by GrandFather (Saint) on Jan 14, 2011 at 05:55 UTC | |
|
Re^4: Alarms with ActivePerl do not work properly
by Anonymous Monk on Jan 13, 2011 at 11:06 UTC |