develooper Front page | perl.perl5.porters | Postings from March 2008

Re: faster safe signals?

Thread Previous | Thread Next
Jim Cromie
March 21, 2008 08:32
Re: faster safe signals?
Message ID:

> # 3 "PERL_ASYNC_CHECK expands to"
> if ((my_perl->Isig_pending)) Perl_despatch_signals(my_perl)
> We do the check after every op. I wondered, if we did the check
> 1: At every LOGOP (so every loop iteration)
do it at nextstates ?

and what about map/grep ?
    in debugger at least, an 'n' will often stop many times at the same 
map/grep op

> 2: At scope exit
> 3: At scope entry (or just subroutine entry, given 1 and 2)
> 4: Before sleep and select

before or after system calls ?
    that buries the check further down ( which may not be bad, just 
different )
    sounds like it would cover case 5 too

theres also a context switch at systemcall, might as well do it then, 
since caches are cold already

> 5: Before and after IO operations
> 6: (maybe also) every time the regexp engine backtracks
Or particularly where regex recursion happens.
I'll wager Yves can find a nice corner to hide this in.

> would Perl 5 be just as responsive at handling signals as it is currently, but
> also faster in the general case?
> Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About