about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-25 01:44:34 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-25 03:13:12 -0800
commit4d8304bf0aa5665e8f8474dfb96019297fa0c2b9 (patch)
tree676418a49b5575209c00fb3bcb83db10df8834bc /t
parent2bc6e7a3c4e972ee3227d931e79bc4057ba278ca (diff)
downloadrainbows-4d8304bf0aa5665e8f8474dfb96019297fa0c2b9.tar.gz
This one seems a easy to get working and supports everything we
need to support from the server perspective.  Apps will need
modified drivers, but it doesn't seem too hard to add
more/better support for wrapping IO objects with Fiber::IO.
Diffstat (limited to 't')
-rw-r--r--t/GNUmakefile1
-rw-r--r--t/simple-http_FiberSpawn.ru9
2 files changed, 10 insertions, 0 deletions
diff --git a/t/GNUmakefile b/t/GNUmakefile
index 193adc0..359f300 100644
--- a/t/GNUmakefile
+++ b/t/GNUmakefile
@@ -21,6 +21,7 @@ export RUBYLIB RUBY_VERSION
 models := ThreadPool ThreadSpawn Rev EventMachine
 ifeq ($(RUBY_VERSION),1.9.1) # 1.9.2-preview1 was broken
   models += Revactor
+  models += FiberSpawn
 
   # technically this works under 1.8, too, it's just slow
   models += RevThreadSpawn
diff --git a/t/simple-http_FiberSpawn.ru b/t/simple-http_FiberSpawn.ru
new file mode 100644
index 0000000..b6994b6
--- /dev/null
+++ b/t/simple-http_FiberSpawn.ru
@@ -0,0 +1,9 @@
+use Rack::ContentLength
+use Rack::ContentType
+run lambda { |env|
+  if env['rack.multithread'] == false && env['rainbows.model'] == :FiberSpawn
+    [ 200, {}, [ Thread.current.inspect << "\n" ] ]
+  else
+    raise "rack.multithread is not true"
+  end
+}