Class: EventCore::IdleSource

Inherits:
Source
  • Object
show all
Defined in:
lib/event_core.rb

Overview

Idle sources are triggered on each iteration of the event loop.

Instance Method Summary collapse

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

Returns:

  • (Boolean)


105
106
107
# File 'lib/event_core.rb', line 105

def ready?
  true
end

#timeoutObject



109
110
111
# File 'lib/event_core.rb', line 109

def timeout
  0
end