Permalink
Browse files

Changed from using Mutex to Monitor. Evidently Mutex causes thread jo…

…in errors when Ruby is compiled with -disable-pthreads
  • Loading branch information...
1 parent 1c2f3c1 commit 50cfbb1177e2163295d34649e98205a3a26dc451 @kpumuk kpumuk committed with ph7 Jan 14, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/system_timer.rb
View
@@ -3,6 +3,7 @@
require 'rubygems'
require 'timeout'
require 'forwardable'
+require 'monitor'
require File.dirname(__FILE__) + '/system_timer/thread_timer'
require File.dirname(__FILE__) + '/system_timer/concurrent_timer_pool'
@@ -31,7 +32,7 @@ module SystemTimer
Thread.exclusive do # Avoid race conditions for mutex and pool creation
@timer_pool = ConcurrentTimerPool.new
- @mutex = Mutex.new
+ @mutex = Monitor.new
end
class << self

0 comments on commit 50cfbb1

Please sign in to comment.