summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemwatcher_fsevents_p.h
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-08-03 15:40:55 +0200
committerNorwegian Rock Cat <qt-info@nokia.com>2009-08-03 15:46:18 +0200
commit6130b2137da4c4aa6f12c2fb4e99ef19ac008781 (patch)
treeb5935e8b8fed3ade63498f2cdaff406e48407732 /src/corelib/io/qfilesystemwatcher_fsevents_p.h
parent87432a42fba53ad910e8e21feb94e638f4ae17eb (diff)
Fix deadlock in the fsevents file watcher.
I was making an assumption that one could call CFRunLoopStop and expect that the runloop would stop very soon afterwards. This is a bit naive and can result in situations where we end up running past and entering run again before everything is finished. We now make sure that we don't leave stop() until the we really have stopped the other thread. Reviewed-by: mbm
Diffstat (limited to 'src/corelib/io/qfilesystemwatcher_fsevents_p.h')
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
index 4770867258..ffc0c687f9 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h
+++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h
@@ -114,6 +114,7 @@ private:
CFRunLoopRef threadsRunLoop;
QMutex mutex;
QWaitCondition waitCondition;
+ QWaitCondition waitForStop;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
PathHash filePathInfoHash;
PathHash dirPathInfoHash;