Sha256: 9635c0c671bf10895503282953ccb93aab590db55c6c817284d5e577896650a5
Contents?: true
Size: 499 Bytes
Versions: 1
Compression:
Stored size: 499 Bytes
Contents
# -*- encoding: binary -*- # :enddoc: class Rainbows::Fiber::Coolio::Server < Coolio::IOWatcher G = Rainbows::G include Rainbows::ProcessClient def to_io @io end def initialize(io) @io = io super(self, :r) end def close detach if attached? @io.close end def on_readable return if G.cur >= MAX c = @io.kgio_tryaccept and Fiber.new { process(c) }.resume end def process(io) G.cur += 1 process_client(io) ensure G.cur -= 1 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rainbows-2.1.0 | lib/rainbows/fiber/coolio/server.rb |