Agent<'TMessage, 'TReply>
Namespace: Wooga.Lambda.Control.Concurrent
Actor/Agent implementation similar to Control.Async.MailboxProcessor in F#
Constructors
Constructor | Description |
new()
Signature: unit -> unit
|
Instance members
Instance member | Description |
Cancel()
Signature: unit -> unit
|
Cancels this agent. |
CancelAsync()
Signature: unit -> Async<Unit>
|
Cancels this agent. |
CancellationRequested()
Signature: unit -> bool
|
Indicates if the agent should cancel and stop |
IsRunning()
Signature: unit -> unit
|
Gets a value indicating whether this agent is running. |
Post(msg)
Signature: msg:'TMessage -> Unit
|
Posts a message to the message queue of the Agent, asynchronously. |
PostAndAsyncReply(f)
Signature: f:Func<AsyncReplyChannel<'TReply>,'TMessage> -> Async<'TReply>
|
|
PostAndReply(f)
Signature: f:Func<AsyncReplyChannel<'TReply>,'TMessage> -> 'TReply
|
|
Receive()
Signature: unit -> Async<'TMessage>
|
Waits for a message. This will consume the first message in arrival order. |
Static members
Static member | Description |
Start(state, body)
Signature: (state:'TState * body:Func<Agent<'TMessage,'TReply>,'TState,'TState>) -> Agent<'TMessage,'TReply>
|
|
StartAsync(state, body)
Signature: (state:'TState * body:Func<Agent<'TMessage,'TReply>,'TState,'TState>) -> Async<Agent<'TMessage,'TReply>>
|