On vendredi 10 novembre 2017 08:41:53 CET Nyall Dawson wrote: > On 10 November 2017 at 08:24, Even Rouault <[email protected]> wrote: > > Digging further this code comes from the dev branch of qt5: > > https://github.com/qt/qtbase/blob/dev/src/corelib/thread/qsemaphore.cpp#L4 > > 14 > > > > Released branches use a different logic: > > https://github.com/qt/qtbase/blob/5.10/src/corelib/thread/qsemaphore.cpp#L > > 217 > > > > Are you running bleeding edge Qt ? > > No - this was just the osgeo4w dev release, so using 5.9.1. > > Still, maybe it's safest if we just don't use tryAcquire for negative > timeouts, and instead use acquire explicitly in this case...
Yes, that seems safer And actually what you observe is logical, since 5.9 is also buggy for a dfferent reason since QSemaphore::tryAcquire(int n, int timeout) https://github.com/qt/qtbase/blob/5.9/src/corelib/thread/qsemaphore.cpp#L217 calls when timeout < 0 QSemaphore::tryAcquire(int n) which returns false when no resource is free https://github.com/qt/qtbase/blob/5.9/src/corelib/thread/qsemaphore.cpp#L188 But 5.8 is ok: https://github.com/qt/qtbase/blob/5.8/src/corelib/thread/qsemaphore.cpp#L217 The regression went per: https://github.com/qt/qtbase/commit/eaee1209f0ead5be786e81db8aee604ccfea85b0#diff-30e4174ed07523635a22648c06274e0e and this should occur also on any platform running qt 5.9 -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
