Class: Lowdown::Connection::Monitor::Condition

Inherits:
Celluloid::Future
  • Object
show all
Defined in:
lib/lowdown/connection/monitor.rb

Overview

The normal Celluloid::Future implementation expects an object that responds to value, when assigning the value via #signal:

  1. https://github.com/celluloid/celluloid/blob/bb282f826c275c0d60d9591c1bb5b08798799cbe/lib/celluloid/future.rb#L106
  2. https://github.com/celluloid/celluloid/blob/bb282f826c275c0d60d9591c1bb5b08798799cbe/lib/celluloid/future.rb#L96

Besides that, this class provides a few more conveniences related to how we use this future.

Defined Under Namespace

Classes: Result

Instance Method Summary collapse

Instance Method Details

#signal(value = nil) ⇒ Object

Only signal once.



21
22
23
# File 'lib/lowdown/connection/monitor.rb', line 21

def signal(value = nil)
  super(Result.new(value)) unless ready?
end