def receive
      timeout = @deadline ? @deadline - Time.now : nil

      debug { "receive timeout=#{timeout}..." }

      begin
        # Celluloid.receive => Celluloid::Actor#receive => Celluloid::Internals::Receiver#receive returns nil on timeout
        message = Celluloid.receive(timeout) { |msg| Kontena::Observable::Message === msg && msg.observer == self }
      rescue Celluloid::TaskTimeout
        # Celluloid.receive => Celluloid::Mailbox.receive raises TaskTimeout insstead
        message = nil
      end

      if message
        return message
      else
        raise Timeout::Error, "observe timeout #{'%.2fs' % timeout}: #{self.describe_observables}"
      end
    end
def receive
      timeout = @deadline ? @deadline - Time.now : nil

      debug { "receive timeout=#{timeout}..." }

      begin
        # Celluloid.receive => Celluloid::Actor#receive => Celluloid::Internals::Receiver#receive returns nil on timeout
        message = Celluloid.receive(timeout) { |msg| Kontena::Observable::Message === msg && msg.observer == self }
      rescue Celluloid::TaskTimeout
        # Celluloid.receive => Celluloid::Mailbox.receive raises TaskTimeout insstead
        message = nil
      end

      if message
        return message
      else
        raise Timeout::Error, "observe timeout #{'%.2fs' % timeout}: #{self.describe_observables}"
      end
    end
Return next observable messages sent to this actor from Observables using #<<
 Suspends the calling celluloid task in between message yields.
 Must be called atomically, suspending in between calls to receive() risks missing intervening messages!

 @raise [Timeout::Error]