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
64 stars 4 forks source link

Refactor away Atomic type #26

Open shayanhabibi opened 2 years ago

shayanhabibi commented 2 years ago

I've refactored the library to stop using the std/atomics because it was very restrictive.

Pros:
std/atomics restriction on the types allowed for its operations to work has been removed

Cons:
There is no hand holding from the compiler (make sure atomic ops are used when required)

Need to rework wards and then create their tests. The biggest blocker to this is the fact that ward inherently requires tests that really strain the std/arc implementation and requires the atomic arc fix.