nicholassm / disruptor-rs

Low latency inter-thread communication library in Rust inspired by the LMAX Disruptor.
MIT License
645 stars 20 forks source link

Mutable Events in Handlers #17

Open auriium2 opened 1 month ago

auriium2 commented 1 month ago

Hello,

I am curious if it is possible to mutate events inside of event handlers with this library? It seems to be possible in the original LMAX disruptor, but not here?

Thank you in advance for your response.

nicholassm commented 1 month ago

Hi, no, in short, it's not possible. You can only get a Producer after giving ownership of the event processors to the disruptor so it's not even possible to pass a Producer to an event processor and publish that way. Is there any particular scenario you're trying to achieve?

Kind regards Nicholas