Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2443

QSystemSemaphore: add bool tryAcquire(int timeout)

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • 4.4.0
    • Core: Threads
    • None
    • 4fe704eff (dev), 002e49590 (6.6)

      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".

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cnn Qt Core & Network
            admin Administrator
            Votes:
            26 Vote for this issue
            Watchers:
            25 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes