diff --git a/src/hx/thread/CountingSemaphore.posix.cpp b/src/hx/thread/CountingSemaphore.posix.cpp index db264945d..bc6e9eddb 100644 --- a/src/hx/thread/CountingSemaphore.posix.cpp +++ b/src/hx/thread/CountingSemaphore.posix.cpp @@ -18,7 +18,7 @@ struct hx::thread::CountingSemaphore_obj::Impl hx::thread::CountingSemaphore_obj::CountingSemaphore_obj(int value) : impl(new Impl()) { - if (0 != (sem_init(&impl->semaphore, false, 3))) + if (0 != (sem_init(&impl->semaphore, false, value))) { hx::Throw(HX_CSTRING("Failed to create semaphore")); }