Class: Pollen::EventLoop
- Inherits:
-
Object
- Object
- Pollen::EventLoop
- Defined in:
- lib/pollen/event_loop.rb
Instance Method Summary collapse
-
#initialize ⇒ EventLoop
constructor
A new instance of EventLoop.
- #proceed(incoming, queue) ⇒ Object
Constructor Details
#initialize ⇒ EventLoop
Returns a new instance of EventLoop.
5 6 7 |
# File 'lib/pollen/event_loop.rb', line 5 def initialize @fibers = {} end |
Instance Method Details
#proceed(incoming, queue) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/pollen/event_loop.rb', line 9 def proceed(incoming, queue) incoming.each { |connection| start_fiber!(connection) } collector = {} @fibers.each do |stream_id, stream_fibers| resume_stream_fibers(stream_id, stream_fibers, queue[stream_id], collector) end prune collector end |