Agent<'T> Type
Represents an asynchronous agent that processes messages of type 'T. This is a wrapper around FSharp's MailboxProcessor, providing a unified API for agent-based concurrency.
Constructors
| Constructor |
Description
|
|
Instance members
| Instance member |
Description
|
|
Gets the cancellation token associated with the agent.
|
Full Usage:
this.CurrentQueueLength
Returns: int
|
Gets the current number of messages in the agent's queue.
|
Full Usage:
this.DefaultTimeout
Returns: int
|
Gets or sets the default timeout for reply operations.
|
|
|
Full Usage:
this.IsCancellationRequested
Returns: bool
|
Gets a value indicating whether cancellation has been requested for the agent.
|
Full Usage:
this.OnError
Returns: IEvent<exn>
|
Event that is triggered when an unhandled exception occurs in the agent's processing loop.
|
Full Usage:
this.Post
Parameters:
'T
|
Posts a message to the agent asynchronously.
|
Full Usage:
this.PostAndAsyncReply
Parameters:
AsyncReplyChannel<'a> -> 'T
Returns: Async<'a>
|
Posts a message to the agent and asynchronously waits for a reply.
|
Full Usage:
this.PostAndReply
Parameters:
AsyncReplyChannel<'Reply> -> 'T
?timeout : int
Returns: 'Reply
|
Posts a message to the agent and synchronously waits for a reply.
|
Full Usage:
this.PostAndTryAsyncReply
Parameters:
AsyncReplyChannel<'a> -> 'T
timeout : int
Returns: Async<'a option>
|
Posts a message to the agent and asynchronously waits for a reply, with a timeout.
|
|
Receives the next message from the agent's queue asynchronously, with a timeout.
|
|
Receives the next message from the agent's queue asynchronously.
|
Full Usage:
this.Start
|
Starts the agent's processing loop. |
Full Usage:
this.StartImmediate
|
Starts the agent's processing loop immediately on the current thread. |
Full Usage:
this.TryPostAndReply
Parameters:
AsyncReplyChannel<'a> -> 'T
timeout : int
Returns: 'a option
|
Posts a message to the agent and synchronously waits for a reply, with a timeout.
|
|
Tries to receive a message from the agent's queue within the specified timeout.
|
|
Static members
| Static member |
Description
|
|
|
|
GenPRES