Hi,

I've been running into issues using adding and removing entries from QFSW in 
concurrent threads. This is in KDevelop while adding all directories of 
multiple projects (source trees) to a single QFSW instance per project. The app 
is somewhat complex so I think but am not entirely certain that the source 
trees are read on a single background thread; if I'm correct each QFSW instance 
is fed from a single thread only. (The QFSW instances are created and "slotted" 
on the main thread.)

The issues range from more or less severe lock-ups on Mac (the hard lock-ups 
occur in the FSEvents backend) to double-free crashes on Linux. I can only 
avoid them by using a single mutex that ensures that only 1 thread can use the 
class at a time.

The QFSW documentation only mentions the class is reentrant. Is QFSW supposed 
to be thread-safe (at least at the class level), on all platforms? Or do we 
have to provide our own protection mechanisms if we want to use the class this 
way?

Thanks,
R.
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to