[Development] Should QFileSystemWatcher be thread-safe? (Qt 5.8.0)
Thiago Macieira
thiago.macieira at intel.com
Fri Sep 29 17:51:54 CEST 2017
On sexta-feira, 29 de setembro de 2017 02:49:32 PDT Konrad Rosenbaum wrote:
> This is why you were able to solve the problem with a Mutex: you ensured
> that the instance was only used by one instance at a time.
That is not a full solution. You may be able to serialise all *your* access
with a mutex, but since QFSW is doing some form of I/O, it may still be woken
up by another thread and do work there. You need to block that thread's event
loop (and you need to know which thread that is yourself) if you want to
ensure full serialisation.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list