Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: using $SIG as an IPC interrupt?

by samtregar (Abbot)
on Aug 21, 2008 at 18:53 UTC ( [id://705940]=note: print w/replies, xml ) Need Help??


in reply to Re^2: using $SIG as an IPC interrupt?
in thread using $SIG as an IPC interrupt?

Yup, that's definitely problematic. I think signals are your only hope here, but you've got some significant problems to solve. For example, recent Perls do not guarantee immediate signal delivery, they only check for new signals between op-codes. Start up a long-running regex and you won't see a signal until it returns. That's better than older Perls though, which had immediate delivery but also offered a side of seg-faults with that meal.

You may need to re-think your design - trying to have a single process handle IPC and do "other stuff" simultaneously is not a good design. Maybe you can fork off that "other stuff" and send it a signal to stop, or pause, when something more important arrives.

-sam

Replies are listed 'Best First'.
Re^4: using $SIG as an IPC interrupt?
by bobbob (Acolyte) on Aug 21, 2008 at 19:01 UTC
    I think that is okay - if I can reduce the latency from ~200ms to ~20ms (even 90% of the time), thats a big win. A seg fault would increase the latency exponentially :-) :-) Thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://705940]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found