Coroutine-based actor interface for asynchronous message processing. More...
#include <actor.hpp>
Public Member Functions | |
void | Receive (TMessageId messageId, TBlob blob, TActorContext::TPtr ctx) override |
Synchronous receive method (calls CoReceive internally) | |
virtual TFuture< void > | CoReceive (TMessageId messageId, TBlob blob, TActorContext::TPtr ctx)=0 |
Asynchronous message processing method. | |
Additional Inherited Members | |
![]() | |
using | TPtr = std::unique_ptr< IActor > |
Coroutine-based actor interface for asynchronous message processing.
ICoroActor extends IActor to support asynchronous message processing using coroutines. The CoReceive method can perform async operations like sleeping, waiting for responses, or doing I/O without blocking the actor system.
|
pure virtual |
Asynchronous message processing method.
messageId | Type identifier of the message |
blob | Serialized message data |
ctx | Actor context for communication |
This method can use co_await to perform asynchronous operations without blocking the actor system thread.
|
overridevirtual |
Synchronous receive method (calls CoReceive internally)
messageId | Type identifier of the message |
blob | Serialized message data |
ctx | Actor context for communication |
Implements NNet::NActors::IActor.