Open oblique opened 2 years ago
The actor Context does have the system, and from there you can use get_actor
or get_or_create_actor
.
There is no equivalent yet for actix::Recipient
. I will see if I can add something similar. Pull requests are also welcome :)
came here to ask about this. I did discover the author's suggestion but a cleaner method would be cool.
let self_ref = _ctx.system.get_actor::<FooActor>(&_ctx.path).await.unwrap()
my use case is spawning a task in a call to handle which at some point in the future needs to ask/tell itself something.
I really liked your crate and wanted to test it and even migrate to it from Actix.
I tried to migrate a small part but I found two missing parts:
ActorRef
ofActor
itself or from itsActorContext
.actix::Recipient
.Are they indeed missing?