Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor LockFreeObject to use RCU #200

Open
drowaudio opened this issue Apr 10, 2024 · 0 comments
Open

Refactor LockFreeObject to use RCU #200

drowaudio opened this issue Apr 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@drowaudio
Copy link
Contributor

drowaudio commented Apr 10, 2024

There is a problem with using LockFreeObject in LockFreeMultiThreadedNodePlayer in that the old node will stay around until the new node is pushed. This is mostly benign apart from some space usage but causes a real problem when Nodes use RAII.

An example of this is MidiInputDeviceNode which unregisters itself as a Consumer in the destructor. If there are always two of these nodes alive for each input device, multiple handleIncomingMidiMessage callbacks will happen for the device and notes will be doubled.

We really need to rely on only one Node being active at each time point.

@drowaudio drowaudio added the bug Something isn't working label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant