Click or drag to resize
Akka.NETReceiveActorReceiveAsyncT Method (FuncT, Task, PredicateT)
Registers an asynchronous handler for incoming messages of the specified type T. If shouldHandle!=null then it must return true before a message is passed to handler.
The actor will be suspended until the task returned by handler completes.
This method may only be called when constructing the actor or from Become(Action) or BecomeStacked(Action).
Note that handlers registered prior to this may have handled the message already. In that case, this handler will not be invoked.

Namespace:  Akka.Actor
Assembly:  Akka (in Akka.dll) Version: (
protected void ReceiveAsync<T>(
	Func<T, Task> handler,
	Predicate<T> shouldHandle = null


Type: SystemFuncT, Task
The message handler that is invoked for incoming messages of the specified type T
shouldHandle (Optional)
Type: SystemPredicateT
When not null it is used to determine if the message matches.

Type Parameters

The type of the message
See Also