summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/scheduler.hxx2
-rw-r--r--vcl/inc/svdata.hxx1
-rw-r--r--vcl/source/app/idle.cxx2
-rw-r--r--vcl/source/app/scheduler.cxx9
-rw-r--r--vcl/source/app/svapp.cxx14
5 files changed, 1 insertions, 27 deletions
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 5c5617cd0c8b..669a402f73d6 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -52,8 +52,6 @@ public:
/// Process one pending Timer with highhest priority
static void CallbackTaskScheduling();
- /// Are there any pending tasks to process?
- static bool HasPendingTasks();
/// Process one pending task ahead of time with highest priority.
static bool ProcessTaskScheduling();
/// Process all events until we are idle
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 844f564c425f..35edf1eec40e 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -327,7 +327,6 @@ struct ImplSchedulerContext
SalTimer* mpSalTimer = nullptr; ///< interface to sal event loop / system timer
sal_uInt64 mnTimerStart = 0; ///< start time of the timer
sal_uInt64 mnTimerPeriod = SAL_MAX_UINT64; ///< current timer period
- bool mbNeedsReschedule = false; ///< we need to reschedule
};
struct ImplSVData
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index 8038005a7d4f..4cbd3f8c0ed6 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -57,8 +57,6 @@ void Idle::Start()
bool Idle::ReadyForSchedule( sal_uInt64 /* nTimeNow */ ) const
{
- ImplSVData *pSVData = ImplGetSVData();
- pSVData->maSchedCtx.mbNeedsReschedule = true;
return true;
}
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 0fba128404fa..038641e274b2 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -173,13 +173,6 @@ bool Scheduler::GetDeterministicMode()
return g_bDeterministicMode;
}
-bool Scheduler::HasPendingTasks()
-{
- const ImplSchedulerContext &rSchedCtx = ImplGetSVData()->maSchedCtx;
- return ( rSchedCtx.mbNeedsReschedule || ((rSchedCtx.mnTimerPeriod != InfiniteTimeoutMs)
- && (tools::Time::GetSystemTicks() >= rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod )) );
-}
-
inline void Scheduler::UpdateMinPeriod( ImplSchedulerData * const pSchedulerData,
const sal_uInt64 nTime, sal_uInt64 &nMinPeriod )
{
@@ -247,7 +240,6 @@ bool Scheduler::ProcessTaskScheduling()
sal_uInt64 nTime = tools::Time::GetSystemTicks();
if ( pSVData->mbDeInit || InfiniteTimeoutMs == rSchedCtx.mnTimerPeriod )
return false;
- rSchedCtx.mbNeedsReschedule = false;
if ( nTime < rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod )
{
@@ -420,7 +412,6 @@ void Task::Start()
mpSchedulerData->mbDelete = false;
mpSchedulerData->mnUpdateTime = tools::Time::GetSystemTicks();
- rSchedCtx.mbNeedsReschedule = true;
}
void Task::Stop()
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 82dc621b4ccc..e2732369bc42 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -470,10 +470,6 @@ inline bool ImplYield(bool i_bWait, bool i_bAllEvents, sal_uLong const nReleased
SAL_INFO("vcl.schedule", "Enter ImplYield: " << (i_bWait ? "wait" : "no wait") <<
": " << (i_bAllEvents ? "all events" : "one event") << ": " << nReleased);
- // we handle pending task outside the system event loop, so don't wait
- if (i_bWait && Scheduler::HasPendingTasks())
- i_bWait = false;
-
// TODO: there's a data race here on WNT only because ImplYield may be
// called without SolarMutex; if we can get rid of LazyDelete (with VclPtr)
// then the only remaining use of mnDispatchLevel is in OSX specific code
@@ -487,24 +483,16 @@ inline bool ImplYield(bool i_bWait, bool i_bAllEvents, sal_uLong const nReleased
i_bWait && !pSVData->maAppData.mbAppQuit,
i_bAllEvents, nReleased);
- SAL_INFO("vcl.schedule", "DoYield returns: " << bProcessedEvent );
-
pSVData->maAppData.mnDispatchLevel--;
DBG_TESTSOLARMUTEX(); // must be locked on return from Yield
- if (nReleased == 0) // tdf#99383 don't run stuff from ReAcquireSolarMutex
- {
- // Process all Tasks
- bProcessedEvent = Scheduler::ProcessTaskScheduling() || bProcessedEvent;
- }
-
// flush lazy deleted objects
if( pSVData->maAppData.mnDispatchLevel == 0 )
vcl::LazyDelete::flush();
SAL_INFO("vcl.schedule", "Leave ImplYield with return " << bProcessedEvent );
- return bProcessedEvent || Scheduler::HasPendingTasks();
+ return bProcessedEvent;
}
bool Application::Reschedule( bool i_bAllEvents )