On 5/9/21 6:58 PM, Ola Fosheim Grostad wrote: > Yes, one semaphore may use an nonoptimal order when it wakes up threads... > Getting this right takes some time. ReadWriteMutex is promising: https://dlang.org/library/core/sync/rwmutex/read_write_mutex.html The writer would be the garbage collecting thread in this case. Ali