randomPoison / thespian

An experiment in designing an ergonomic actor framework for Rust
1 stars 0 forks source link

Use crossbeam-channel for actor message queue #13

Open randomPoison opened 4 years ago

randomPoison commented 4 years ago

Currently we're using the MPSC channel from the futures crate as the underlying channel for sending messages to actors. This was because we originally needed a futures-aware channel so that we could .await on sending the message. Now that #11 has changed message sending to always complete synchronously, this functionality is no longer needed.

There are two main advantages to switching to crossbeam-channels would be:

We should continue to use the oneshot channel provided by the futures crate for sending message responses, since it works well for our purposes and we actually benefit from using a futures-aware channel when sending a response.