From 6edaf2b720743fa0ce751b45a0923712b8ed5909 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 14 Oct 2009 17:39:10 -0700 Subject: rack.multithread is only true for Thread* models Enabling thread-safe or thread-aware code paths in applications may even be dangerous in some cases and cause deadlocks in code that otherwise does not expect threads. This is especially true of the Revactor case where being a "drop-in" replacement for IO routines is dangerous if a mutex is held while an Actor performs a "blocking" I/O operation. Basically start to assume that anybody writing an app using Rev or Revactor already takes Rev/Revactor concurrency into account and won't need the rack.multithread flag set to do special things. --- lib/rainbows/thread_spawn.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/rainbows/thread_spawn.rb') diff --git a/lib/rainbows/thread_spawn.rb b/lib/rainbows/thread_spawn.rb index 05068fc..f14ed1c 100644 --- a/lib/rainbows/thread_spawn.rb +++ b/lib/rainbows/thread_spawn.rb @@ -15,6 +15,7 @@ module Rainbows def worker_loop(worker) init_worker_process(worker) + RACK_DEFAULTS["rack.multithread"] = true threads = ThreadGroup.new alive = worker.tmp m = 0 -- cgit v1.2.3-24-ge0c7