m2r icon indicating copy to clipboard operation
m2r copied to clipboard

Handle signals

Open paneq opened this issue 13 years ago • 5 comments

For:

  • graceful stop
  • force stop
  • adding a thread
  • removing a thread
  • reloading configuration (if possible...)

Signal handling should be defined in our m2r binary instead of in the handler itself (as it is currently in rack-adapter branch).

paneq avatar Jul 17 '12 23:07 paneq

What do you mean by m2r binary?

mostlyobvious avatar Jul 18 '12 23:07 mostlyobvious

bin/m2r in the future.

paneq avatar Jul 18 '12 23:07 paneq

I think that signal handling should be easy to turn off in case someone wants to use our library in another libary or tests or something and handle them suitable to his/her needs.

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/4039

I am not sure which part of this information is still true but we should be aware of the fact that #trap overwrites previous trap calls for particular signals. And that it is called in main thread (probably). That might be important when we become multithreading software.

paneq avatar Jul 25 '12 22:07 paneq

http://blog.rubybestpractices.com/posts/ewong/016-Implementing-Signal-Handlers.html

paneq avatar Nov 14 '12 19:11 paneq

http://blog.headius.com/2008/02/ruby-threadraise-threadkill-timeoutrb.html http://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html

paneq avatar Nov 14 '12 19:11 paneq