Class: EventCore::IdleSource
Overview
Idle sources are triggered on each iteration of the event loop.
Instance Method Summary collapse
- #consume_event_data! ⇒ Object
-
#initialize(event_data = nil) ⇒ IdleSource
constructor
A new instance of IdleSource.
- #ready? ⇒ Boolean
- #timeout ⇒ Object
Methods inherited from Source
#close!, #closed?, #event_factory, #notify_trigger, #ready!, #select_io, #select_type, #trigger
Constructor Details
#initialize(event_data = nil) ⇒ IdleSource
Returns a new instance of IdleSource.
99 100 101 102 103 |
# File 'lib/event_core.rb', line 99 def initialize(event_data=nil) super() @ready = true @event_data = event_data end |
Instance Method Details
#consume_event_data! ⇒ Object
113 114 115 |
# File 'lib/event_core.rb', line 113 def consume_event_data! @event_data end |
#ready? ⇒ Boolean
105 106 107 |
# File 'lib/event_core.rb', line 105 def ready? true end |
#timeout ⇒ Object
109 110 111 |
# File 'lib/event_core.rb', line 109 def timeout 0 end |