Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Aisteoir - minimal actor framework built on top of tokio
let first_actor = FirstActor {};
let first_actor_tx = start_actor(actor, 100);
first_actor_tx.tell(FirstActorMessage::SomeRequest, SomeRequest { number: 3 })
.await?; // fire and forget
let second_actor = SecondActor { tx };
let second_actor_tx = start_actor(second_actor, 100);
let result = second_actor_tx
.call(SecondActorMessage::Calc, SecondActorCalcRequest(10))
.await?; // request-response
println!("Result: {}", result.0);
I wasn't satisfied with existing actor frameworks implementation of request-response patterns and other issues, such as:
So I built my own minimal library for my own projects and for educational purposes.
I would appreciate feedback. Thanks
3 posts - 2 participants
🏷️ Rust_feed