proc wait*(self: Semaphore): int64 {.gcsafe, locks: 0.}
proc post*(self: Semaphore): int64 {.gcsafe, locks: 0.}