Class: Celluloid::SignalConditionRequest

Inherits:
SystemEvent show all
Defined in:
lib/celluloid/system_events.rb

Overview

Signal a condition

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from SystemEvent

handle, handler

Constructor Details

#initialize(task, value) ⇒ SignalConditionRequest

Returns a new instance of SignalConditionRequest.



114
115
116
117
# File 'lib/celluloid/system_events.rb', line 114

def initialize(task, value)
  @task = task
  @value = value
end

Instance Attribute Details

#taskObject (readonly)

Returns the value of attribute task.



118
119
120
# File 'lib/celluloid/system_events.rb', line 118

def task
  @task
end

#valueObject (readonly)

Returns the value of attribute value.



118
119
120
# File 'lib/celluloid/system_events.rb', line 118

def value
  @value
end

Instance Method Details

#callObject



122
123
124
# File 'lib/celluloid/system_events.rb', line 122

def call
  @task.resume(@value)
end