mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-10-03 23:48:22 +00:00
22 lines
243 B
Ruby
22 lines
243 B
Ruby
require 'fiber'
|
|
class SuspendingBody
|
|
|
|
def each
|
|
for i in 1..10
|
|
yield "number: #{i}\n"
|
|
Fiber.yield
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
class RackFoo
|
|
|
|
def call(env)
|
|
[200, { 'Content-Type' => 'text/plain'}, SuspendingBody.new]
|
|
end
|
|
|
|
end
|
|
|
|
run RackFoo.new
|