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!