tqwewe / kameo

Fault-tolerant Async Actors Built on Tokio
https://docs.page/tqwewe/kameo
Apache License 2.0
633 stars 16 forks source link

feat!: use owned actor ref in `spawn_with` function #68

Closed tqwewe closed 1 week ago

tqwewe commented 1 month ago

The spawn_with function previously provided &ActorRef<A> as an argument, which was good for performance, however will always need to be cloned into the returned future. Without cloning, you'd get some annoying compile errors.

This PR makes it an owned ActorRef<A> to simplify the usage of spawn_with.