Fix Thread.exclusive deprecation in Ruby 2.3.0 #85

Merged
merged 1 commit into from Dec 28, 2015
Jump to file or symbol
Failed to load files and symbols.
+3 −2
Diff settings

Always

Just for now

@@ -11,14 +11,15 @@ def initialize(options, app)
@web_sockets = []
@options = options
@thread = start_threaded_reactor(options)
+ @mutex = Thread::Mutex.new
end
def app= app
- Thread.exclusive { @app = app }
+ @mutex.synchronize { @app = app }
end
def logger
- Thread.exclusive { @app.logger }
+ @mutex.synchronize { @app.logger }
end
def stop