syn
syn copied to clipboard
Take inspiration from nsync
The nsync library relies on an internal rwlock. It only requires an UInt32 integer and it's filled with smart ideas to implement very efficient mutexes, rwlocks and condition variables.
So efficient that benchmarks must explicitly set the CPU into performance mode, otherwise the OS governor will keep the it in powersave mode, and make it feel like it's damn slow 😅