[Interest] tryLock for QSystemSemaphore

Konstantin Shegunov kshegunov at gmail.com
Sat Oct 21 19:01:26 CEST 2017


On Sat, Oct 21, 2017 at 7:51 PM, Thiago Macieira <thiago.macieira at intel.com>
wrote:
>
> Yes, if someone writes the code. I'm not volunteering.
>

Fair enough, I'll see if I can squeeze it in the future then.


> What do you mean by that? .acquire() does return (if that's what you mean
> by
> "free the thread") if there was something to be acquired. So the question
> back
> to you is why there wasn't something to be acquired?
>

Assuming my test is failing, which would be the whole reason of writing
tests to check the implementation, right, I would likely end up a situation
where a sibling process waiting for a message from the root process, while
at the same time the root process waits on `acquire` for the sibling
process to signal the semaphore. Ultimately, I'd just end up deadlocking
without a means to tell the root process to run the MPI abort routines
(i.e. stop the whole MPI thing) because the root process is simply waiting
on the system semaphore. That's what I mean by it "doesn't free the thread"
- I'd end up with a deadlocked test program.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171021/f9992087/attachment.html>


More information about the Interest mailing list