From 58661617ab802010ecbc45ce3afbca1d63cb9189 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 26 May 2010 22:20:57 +0000 Subject: add WriterThreadSpawn concurrency model --- t/GNUmakefile | 1 + t/simple-http_WriterThreadSpawn.ru | 9 +++++++++ t/t0200-async-response.sh | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 t/simple-http_WriterThreadSpawn.ru (limited to 't') diff --git a/t/GNUmakefile b/t/GNUmakefile index 6540aa0..66c4681 100644 --- a/t/GNUmakefile +++ b/t/GNUmakefile @@ -23,6 +23,7 @@ endif export RUBYLIB RUBY_VERSION models += WriterThreadPool +models += WriterThreadSpawn models += ThreadPool models += ThreadSpawn models += Rev diff --git a/t/simple-http_WriterThreadSpawn.ru b/t/simple-http_WriterThreadSpawn.ru new file mode 100644 index 0000000..69136f0 --- /dev/null +++ b/t/simple-http_WriterThreadSpawn.ru @@ -0,0 +1,9 @@ +use Rack::ContentLength +use Rack::ContentType +run lambda { |env| + if env['rack.multithread'] && env['rainbows.model'] == :WriterThreadSpawn + [ 200, {}, [ Thread.current.inspect << "\n" ] ] + else + raise "rack.multithread is false" + end +} diff --git a/t/t0200-async-response.sh b/t/t0200-async-response.sh index a1c5928..16e1f76 100755 --- a/t/t0200-async-response.sh +++ b/t/t0200-async-response.sh @@ -2,7 +2,7 @@ CONFIG_RU=${CONFIG_RU-'async-response.ru'} . ./test-lib.sh -skip_models Base WriterThreadPool +skip_models Base WriterThreadPool WriterThreadSpawn case $CONFIG_RU in *no-autochunk.ru) -- cgit v1.2.3-24-ge0c7