Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
4.4.0
-
None
-
4fe704eff (dev), 002e49590 (6.6)
Description
As documented, QSystemSemaphore::acquire() always blocks the call, if all the resources have already been acquired, until some another process release resource. And there is no way nor to know a number of available resources, nor to try to acquire resources without blocking the call. At the same time QSemaphore have both tryAcquire(...) and available().
This makes QSystemSemaphore unusable for some purposes and one needs to write an own almost-the-same semaphore. So it would be nice adding "bool QSystemSemaphore::tryAcquire(int timeout)" to the public API.
Also, "src/corelib/kernel/qsystemsemaphore_unix.cpp:233" outputs "SystemSempahore" instead of "SystemSemaphore".
Attachments
Issue Links
- replaces
-
QTBUG-4073 QSharedMemory: Add a blocking and non-blocking variant of a tryLock() function
- Closed