tonarino / actor

A minimalist actor framework aiming for high performance and simplicity.
MIT License
40 stars 6 forks source link

Support blocking Recipient::send() - or another form of backpressure? #24

Open strohel opened 3 years ago

strohel commented 3 years ago

If I understand the overall architecture right, the "flow control" using actor feels most natural when there are slow producers and fast consumers. Or if dropping messages is fine.

In the other case, the channels would quickly become full. Senders receive a specific error in that case, but it is not clear how they should react. Simply sleeping is prone to reduce throughput, and may require tuning.

A blocking variant of send() could help here, but it could open a Pandora's box at the same time (e.g. how to shut down a blocked actor?). I.e. this may be a complex topic.

This is probably not a Before Release material. The ticket serves mainly to get people's feedback.