Skip Menu |

This queue is for tickets about the Linux-Epoll CPAN distribution.

Report information
The Basics
Id: 78078
Status: resolved
Priority: 0/
Queue: Linux-Epoll

People
Owner: LEONT [...] cpan.org
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.004
Fixed in: 0.005



Subject: Please allow undef/EINTR behaviour
It would be useful if there could be a (possibly non-default) mode that, rather than $epoll->wait restarting on EINTR, it could return immediately. Currently, I have to end every %SIG handler with a special die "EINTR"; and wrap the call to ->wait with my $ret = eval { $epoll->wait( ... ) }; $ret = -1 if $@ eq "EINTR"; Having a mode where wait would return immediately instead of retrying would simplify this, and perhaps improve performance too. -- Paul Evans
On Wed Jun 27 20:13:29 2012, PEVANS wrote: Show quoted text
> It would be useful if there could be a (possibly non-default) mode that, > rather than $epoll->wait restarting on EINTR, it could return immediately. > > Currently, I have to end every %SIG handler with a special die "EINTR"; > and wrap the call to ->wait with > > my $ret = eval { $epoll->wait( ... ) }; > $ret = -1 if $@ eq "EINTR"; > > Having a mode where wait would return immediately instead of retrying > would simplify this, and perhaps improve performance too.
I'm not sure what I was thinking, what I'm doing now is screwing up timeouts, it should have been doing what you're suggesting in the first place. And probably it should be a bit less eager to throw exceptions anyway (one convention I used elsewhere that I find very effective is to only throw them in void context). Leon