[Interest] tryLock for QSystemSemaphore

Konstantin Shegunov kshegunov at gmail.com
Sat Oct 21 18:42:45 CEST 2017


On Sat, Oct 21, 2017 at 7:35 PM, Thiago Macieira <thiago.macieira at intel.com>
wrote:
>
> The reason is that it was never implemented. I've just checked and both
> backends could have it.
>

This is encouraging. Could we maybe have that implemented/added to the
class for a future release?


> As to what you're stuck with, we need to know what you're trying to do.
>

Well, I'm about to start writing autotests for a small module I've written.
It's an IPC message passing wrapper (around OpenMPI) so I'd need a
"concurrent" IPC sync technique to be able to test how it fares, e. g. if
synchronous communication in the module is working as expected. That's why
I thought I might take advantage of Qt's system sem. class. Unfortunately,
`acquire()` doesn't ever free the thread it's called from, so a possible
workaround I see currently is to start a thread and handle the timeout
manually - releasing the system semaphore by hand if time runs out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171021/e7252527/attachment.html>


More information about the Interest mailing list