Wooga.Lambda


Agent<'TMessage, 'TReply>

Namespace: Wooga.Lambda.Control.Concurrent

Actor/Agent implementation similar to Control.Async.MailboxProcessor in F#

Constructors

ConstructorDescription
new()
Signature: unit -> unit

Instance members

Instance memberDescription
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 memberDescription
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>>
Fork me on GitHub