WinRT: Don't use the native thread handle for waiting
authorAndrew Knight <andrew.knight@digia.com>
Thu, 10 Apr 2014 14:12:20 +0000 (17:12 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 16 Apr 2014 10:26:43 +0000 (12:26 +0200)
commit8b0fd78caa8e257757d3eb84732e38cf735b2136
treeb9987df9b68570575ed5d7fd323e0fffeab27990
parent839c54e070727540570b5994908d461bb7bb4dfd
WinRT: Don't use the native thread handle for waiting

There is no guarantee that the handle from std::thread will be valid
when a wait is made. Instead, simply use an elapsed timer and check
if the thread is finished. This prevents an exception from being thrown
when a bad handle is encountered.

Task-number: QTBUG-31397
Change-Id: Ie2a7e6cbfbb27bf1baff779322670d85e92e10dd
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
src/corelib/thread/qthread_win.cpp