Releases: nim-works/loony
v0.1.6
Debugging
-d:loonyDebug
will turn on atomic counters for loony internal node allocation and deallocations in case you are concerned about memory leaks from the queue.
At any point you can call echoDebugNodeCounter()
to have the count printed to stdout; or you can check that a code block finishes with the same number of nodes it started off with (else it will print them to screen) using debugNodeCounter: discard # body here
.
Deprecated
initLoonyQueue[T]()
is deprecated in favour ofnewLoonyQueue[T]()
Next
State management
The principle of the next update will be in response to #18 - the idea will be creating a container object which can enforce behaviour on any other thread using that container to access the queue.
- Clear queue
- Pause queue
- Resume queue
Percolating:
- Pause pop
- Pause push
- Broadcasting over a queue
- Broadcasting over all queues
The difficulty will be in maintaining the balance between providing an api that is enjoyable and easy to use without affecting performance for those who don’t want to use it. The algorithm at its core is fast; it does this by using the exact number of atomic operations that it needs and no more. Every write/read of an atomic adds a cost that defeats the purpose of the algorithm and must be kept in mind.
v0.1.3
Changes:
- Push/Pop use atomic_thread_fence primitive to ensure memory coherency of non-atomics associated with the ref pushed through the queue
- unsafePush/unsafePop function the same as pre-0.1.3 push/pop (ie dont use atomic_thread_fnece)
We're looking forward to feedback!