-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
You can't take a mutex from a signal handler in Ruby 2.0+. Here's what Sidekiq does to get around this limitation:
https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/cli.rb#L73
log writing failed. can't be called from trap context
/Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/monitor.rb:185:in `lock': can't be called from trap context (ThreadError)
from /Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/monitor.rb:185:in `mon_enter'
from /Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/monitor.rb:209:in `mon_synchronize'
from /Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/redis_failover-1.0.2/lib/redis_failover/node_manager.rb:99:in `shutdown'
from /Users/mperham/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/redis_failover-1.0.2/lib/redis_failover/runner.rb:21:in `block (2 levels) in trap_signals'
Metadata
Metadata
Assignees
Labels
No labels