Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 committed Jul 19, 2023
1 parent 282fb82 commit d70229a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,20 @@ that they were queued with a call to `Post`. This class is derived from `AsyncM
see above for further details. Also included is `SendAsync`, which will queue an asynchronous
delegate and return its result after it executes (in its turn). Any further code after
awaiting a `Task` returned by `SendAsync` will not prevent additional delegates in the queue
from executing.
from executing. `SendAsync` also accepts an optional timeout and cancellation token parameter.
If the timeout expires before the delegate is executed, a `TimeoutException` is thrown and the
delegate is not executed. Similarly, if the cancellation token is triggered before the delegate
is executed, a `OperationCanceledException` is thrown and the delegate is not executed.

Public methods:

- `void Post(Func<Task> message)`
- `void Post(Task<Func<Task>> messageTask)` (inherited; not typically used)
- `Task SendAsync(Func<Task> action)`
- `Task SendAsync(Func<Task> action, CancellationToken token)`
- `Task SendAsync(Func<Task> action, TimeSpan timeout, CancellationToken token = default)`
- `Task<T> SendAsync<T>(Func<Task<T>> action)`
- `Task<T> SendAsync<T>(Func<Task<T>> action, CancellationToken token)`
- `Task<T> SendAsync<T>(Func<Task<T>> action, TimeSpan timeout, CancellationToken token = default)`
- `Task DrainAsync()`

Public properties:
Expand Down

0 comments on commit d70229a

Please sign in to comment.