summaryrefslogtreecommitdiff
path: root/vcl/source/app/svapp.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-09-16 19:17:31 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2018-09-24 14:12:58 +0200
commitd0bd1880f4edf6b5a1657e675aa10a6418003d99 (patch)
treef87a18f808620ded18dd08a02b909a7e241214d8 /vcl/source/app/svapp.cxx
parentd4f871a859d969172bd1f8959e86f40993664ad5 (diff)
Scheduler: add per-priority Task lists
This way we don't have to search the whole list for a higher priority event, if an immediate Task is found. This probably helps bugs like tdf#119724 and tdf#119428. Change-Id: Ic5685193d1bedb6996cf46f0ee2cba42190ff7cc Reviewed-on: https://gerrit.libreoffice.org/60572 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/source/app/svapp.cxx')
-rw-r--r--vcl/source/app/svapp.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index ec151895815a..ca3848d58a22 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -503,21 +503,24 @@ void Scheduler::ProcessEventsToIdle()
// events were processed at some point, but our check can't prevent further
// processing in the main thread, which may add new events, so skip it.
const ImplSVData* pSVData = ImplGetSVData();
- if ( !pSVData->mpDefInst->IsMainThread() )
+ if (!pSVData->mpDefInst->IsMainThread())
return;
- const ImplSchedulerData* pSchedulerData = pSVData->maSchedCtx.mpFirstSchedulerData;
- while ( pSchedulerData )
+ for (int nTaskPriority = 0; nTaskPriority < PRIO_COUNT; ++nTaskPriority)
{
- if ( pSchedulerData->mpTask && !pSchedulerData->mbInScheduler )
+ const ImplSchedulerData* pSchedulerData = pSVData->maSchedCtx.mpFirstSchedulerData[nTaskPriority];
+ while (pSchedulerData)
{
- Idle *pIdle = dynamic_cast<Idle*>( pSchedulerData->mpTask );
- if ( pIdle && pIdle->IsActive() )
+ if (pSchedulerData->mpTask && !pSchedulerData->mbInScheduler)
{
- SAL_WARN( "vcl.schedule", "Unprocessed Idle: "
- << pIdle << " " << pIdle->GetDebugName() );
+ Idle *pIdle = dynamic_cast<Idle*>(pSchedulerData->mpTask);
+ if (pIdle && pIdle->IsActive())
+ {
+ SAL_WARN("vcl.schedule", "Unprocessed Idle: "
+ << pIdle << " " << pIdle->GetDebugName());
+ }
}
+ pSchedulerData = pSchedulerData->mpNext;
}
- pSchedulerData = pSchedulerData->mpNext;
}
#endif
}