Skip to content

v0.1.6

Compare
Choose a tag to compare
@shayanhabibi shayanhabibi released this 01 Oct 12:32
· 49 commits to main since this release

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 of newLoonyQueue[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.