interface Receiver<T : Any>
Represents a synchronous receiver of events.
Note that the `receive` methods may block the calling fiber but will not block an underlying kernel thread.
Author
Tim Fox
abstract fun receive(): T
Return an event when one is available. This method will block the fiber until one is available. No kernel thread is blocked. abstract fun receive(timeout: Long): T
Return an event when one is available. This method will block the fiber until one is available, or timeout occurs. No kernel thread is blocked. |
|
abstract fun receivePort(): ReceivePort<T> |
interface HandlerReceiverAdaptor<T : Any> : Handler<T>, Receiver<T>
Represents an object that is both a handler of a particular event and also a receiver of that event. In other words it converts an asynchronous stream of events into a synchronous receiver of events |