proc wait(self: Semaphore): Error {.gcsafe, locks: 0, raises: [], tags: [].}
proc post(self: Semaphore): Error {.gcsafe, locks: 0, raises: [], tags: [].}