nim-works / loony

A high throughput MPMC lock-free queue based on a paper by Giersch, Nolte et al implemented in pure Nim.
https://nim-works.github.io/loony/
MIT License
65 stars 4 forks source link

Add State Manager #19

Closed shayanhabibi closed 3 years ago

shayanhabibi commented 3 years ago

This will contain the Ward container which can have flags set to allow certain behaviours to be applied and observed by other threads holding the Ward.

I have implemented the basic structure of the Ward object and a Pausable flag/function.

More to follow

shayanhabibi commented 3 years ago

@disruptek can I get you to review the clearImpl in loony and see what you think? Does the logic make sense?

I am primarily concerned about the edge cases where other threads are cooperatively updating the queue nodes, interfering with that, and somehow messing with their reclamations or making them get stuck in a loop.

But maybe thats not an issue? see what you think.

After that everything is ready. Just needs to test. You will now be able to:

Todo: