Fix potential race condition in data structure of adopted thread watcher
authorjian liang <jianliang79@gmail.com>
Sun, 19 Feb 2012 14:09:44 +0000 (22:09 +0800)
committerQt by Nokia <qt-info@nokia.com>
Tue, 28 Feb 2012 14:35:06 +0000 (15:35 +0100)
commit50ad6db629ecd268192023ad97577c51c9b19c32
tree19aaf0633a3a02c6f52dc599c0ee2534dba3f897
parentaaa46755dcc15b8baaa0d1b928828eb60e0babbc
Fix potential race condition in data structure of adopted thread watcher

Fix potential race condition in data structure of adopted thread watcher
in Windows. Since QVector is not thread safe, it is not safe to read and
append data to qt_adopted_thread_handles or qt_adopted_qthread
simultaneously in qthread_win.cpp. This patch fix this race condition.

Change-Id: I2d0c7a4cdde5390d38d15c98343f0fc6ddd24aba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
(cherry picked from commit 4b30882a3f74914156f165a0a062b54ad3686c45)
src/corelib/thread/qthread_win.cpp