Skip to content

pyama86/mruby-signal-thread

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

mruby-signal-thread Build Status

SignalThread class

install by mrbgems

  • add conf.gem line to build_config.rb
MRuby::Build.new do |conf|

    # ... (snip) ...

    conf.gem :github => 'pyama86/mruby-signal-thread'
end

example

SignalThread.trap(:HUP) do
  puts "foo"
end

puts "wait..."
loop { sleep 1 }
$ mruby/bin/mruby example/signal_thread.rb &
wait...
$ kill -HUP $(pidof mruby)
foo

License

under the MIT License:

  • see LICENSE file

About

Multi-threaded signal handler

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published