repo.or.cz
/
rainbows.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
new RevFiberSpawn concurrency model
[rainbows.git]
/
t
/
t9000.ru
blob
abf36b2a2df266f513ca30a063f01d79be709cb3
1
use Rack::ContentLength
2
use Rack::ContentType
3
use Rainbows::AppPool, :size => ENV['APP_POOL_SIZE'].to_i
4
class Sleeper
5
def call(env)
6
(case env['rainbows.model']
7
when :FiberPool, :FiberSpawn
8
Rainbows::Fiber
9
when :Revactor
10
Actor
11
when :RevFiberSpawn
12
Rainbows::Fiber::Rev
13
else
14
Kernel
15
end).sleep(1)
16
[ 200, {}, [ "#{object_id}\n" ] ]
17
end
18
end
19
run Sleeper.new