about summary refs log tree commit homepage
path: root/t/app_deferred.ru
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-05-04 13:47:11 -0700
committerEric Wong <normalperson@yhbt.net>2010-05-04 13:50:25 -0700
commit52b306c5cd47e34644f7ec5f7ab100855929b618 (patch)
tree47b4782443754573dfad3815807e361dda69e616 /t/app_deferred.ru
parente8cedc2584d23a8ab214ff96a973dc37344c2796 (diff)
downloadrainbows-52b306c5cd47e34644f7ec5f7ab100855929b618.tar.gz
Since deferred requests run in a separate thread, this affects
the root (non-deferred) thread as well since it may share
data with other threads.
Diffstat (limited to 't/app_deferred.ru')
-rw-r--r--t/app_deferred.ru1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/app_deferred.ru b/t/app_deferred.ru
index 179ac95..a70b33b 100644
--- a/t/app_deferred.ru
+++ b/t/app_deferred.ru
@@ -10,6 +10,7 @@ class DeferredApp < Struct.new(:app)
   end
 
   def call(env)
+    env["rack.multithread"] or raise RuntimeError, "rack.multithread not true"
     body = "#{Thread.current.inspect}\n"
     headers = {
       "Content-Type" => "text/plain",