summaryrefslogtreecommitdiff
path: root/vcl/win/app/saltimer.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-07-24 15:45:32 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2017-07-24 18:05:07 +0200
commit4815b6f7c70cca5a226163caaaab8a227f32be48 (patch)
treeb4218e217c7ebe8d2c78cb24a430b64baa207efc /vcl/win/app/saltimer.cxx
parent9dfd1bb102bb08f0651a6921722d731ab973bd08 (diff)
WIN don't yield the scheduler in PeekMessage
The scheduler is restarting the timer at the end of the most important task search. It uses PeekMessage PM_REMOVE to remove old SAL_MSG_TIMER_CALLBACK messages from the queue. Without PM_NOYIELD, in combination with an other thread yielding using SAL_MSG_THREADYIELD, this could re-start scheduling inside these PeekMessage calls, resulting in various assertions inside the scheduler code, most time due to the changed ascheduler list in "assert( pPrevSchedulerData->mpNext == pSchedulerData )". Change-Id: Ia96b6c0e06ffc3126b1428723b53f4b2112f8a5f
Diffstat (limited to 'vcl/win/app/saltimer.cxx')
-rw-r--r--vcl/win/app/saltimer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx
index ae8ed0790bf5..4ca5ebb572d2 100644
--- a/vcl/win/app/saltimer.cxx
+++ b/vcl/win/app/saltimer.cxx
@@ -49,7 +49,7 @@ void ImplSalStopTimer()
MSG aMsg;
int nMsgCount = 0;
while ( PeekMessageW(&aMsg, nullptr, SAL_MSG_TIMER_CALLBACK,
- SAL_MSG_TIMER_CALLBACK, PM_REMOVE) )
+ SAL_MSG_TIMER_CALLBACK, PM_REMOVE | PM_NOYIELD) )
nMsgCount++;
assert( nMsgCount <= 1 );
pSalData->mbOnIdleRunScheduler = false;