Closed shayanhabibi closed 2 years ago
Have decided on using Darwin ulock primitives which are basically futexes.
Issue being they are private functions.
proc ulock_wait*(operation: uint32, address: pointer, value: uint64, timeout: uint32): cint {.importc: "__ulock_wait", cdecl.}
Issue
Currently I use linux futex and windows waitonaddress to manage backpressure when using Wards and Loony as a threadpool queue.
Mac/Darwin do not have primitives or APIs that are similar.
Solutions
At the moment, I can only think of using conditions and locks.