about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-12-22 00:32:04 -0800
committerEric Wong <normalperson@yhbt.net>2009-12-22 00:38:04 -0800
commit19960488441651d689259071fa1be4f6957d681b (patch)
tree80c5752ad4484361c74a081d06fb6e43632d860a /t
parentee7fe220ccbc991e1e7cbe982caf48e3303274c7 (diff)
downloadrainbows-19960488441651d689259071fa1be4f6957d681b.tar.gz
This is like the traditional FiberSpawn, but more scalable (but
not necessarily faster) as it can use epoll or kqueue.
Diffstat (limited to 't')
-rw-r--r--t/simple-http_RevFiberSpawn.ru10
-rw-r--r--t/sleep.ru2
-rw-r--r--t/t9000.ru2
3 files changed, 14 insertions, 0 deletions
diff --git a/t/simple-http_RevFiberSpawn.ru b/t/simple-http_RevFiberSpawn.ru
new file mode 100644
index 0000000..ea9b0e3
--- /dev/null
+++ b/t/simple-http_RevFiberSpawn.ru
@@ -0,0 +1,10 @@
+use Rack::ContentLength
+use Rack::ContentType
+run lambda { |env|
+  if env['rack.multithread'] == false &&
+    env['rainbows.model'] == :RevFiberSpawn
+    [ 200, {}, [ Thread.current.inspect << "\n" ] ]
+  else
+    raise env.inspect
+  end
+}
diff --git a/t/sleep.ru b/t/sleep.ru
index 2df22ce..d0fd832 100644
--- a/t/sleep.ru
+++ b/t/sleep.ru
@@ -12,6 +12,8 @@ run lambda { |env|
     Rainbows::Fiber
   when :Revactor
     Actor
+  when :RevFiberSpawn
+    Rainbows::Fiber::Rev
   else
     Kernel
   end).sleep(nr)
diff --git a/t/t9000.ru b/t/t9000.ru
index 4ca36c1..abf36b2 100644
--- a/t/t9000.ru
+++ b/t/t9000.ru
@@ -8,6 +8,8 @@ class Sleeper
       Rainbows::Fiber
     when :Revactor
       Actor
+    when :RevFiberSpawn
+      Rainbows::Fiber::Rev
     else
       Kernel
     end).sleep(1)