From 4d8304bf0aa5665e8f8474dfb96019297fa0c2b9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 25 Nov 2009 01:44:34 -0800 Subject: add FiberSpawn concurrency model 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. --- t/GNUmakefile | 1 + t/simple-http_FiberSpawn.ru | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 t/simple-http_FiberSpawn.ru (limited to 't') 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 +} -- cgit v1.2.3-24-ge0c7