@bascule if trap can't mutex, and jruby can't fork... how would this work?
@drawohara JRuby can still pipe... you just open a pipe and write to it from the signal handler
-
-
@bascule you mean intra-process then? -
@drawohara confirm, use a pipe to send a message from a signal handler to a thread which runs hooks for each signal one-by-one -
@bascule clever. how do you avoid having an intra-process pipe close war on the r/w ends? -
@drawohara well, ideally, you'd never close either end of the pipe... -
@bascule you have to to avoid deadlock... but with socket pair it works.... like this? https://gist.github.com/ahoward/5447859 -
@drawohara what's wrong with a pipe? -
@bascule because, with a pipe, you can use the w end until the r is closed, or vise versa, and we need both open intra process - no? -
@drawohara IMO you shouldn't ever close either end - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.