randomPoison / thespian

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

Investigate parallel message processing #12

Open randomPoison opened 4 years ago

randomPoison commented 4 years ago

In theory, it should be possible have message handlers that only require &self to run in parallel. If an actor receives multiple messages in a row that only require &self, they could all be processed in parallel until a message requiring &mut self is received.

While this seems like a potentially nice optimization, there are also potential issues that would need to be addressed as well:

I think the thing to do here is build out a prototype of the functionality so that we can evaluate how well it works. I'm also going to keep an eye out for cases where this would be beneficial in practice so that we can have some more concrete use cases to drive discussion.