summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-12-04 21:05:28 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2020-12-07 14:23:57 +0100
commite4b702718e83c1ad76f001e4d3641cc2dd17cd7b (patch)
treeaeafb049de87bf3736ee8f7db98b87a6c625de4b /vcl/source/app
parentdd5a1d31adbd43e81f7165c913ce474df74a85b7 (diff)
Unlock scheduler in deinit for ProcessEventsToIdle
The scheduler is normally never locked when not processing its own task lists. So while the fix is correct, that ProcessEventsToIdle shouldn't run with a locked scheduler, just unlock it in the actual shutdown case, where the deadlock occurred. This also reverts commit 46f6b39c6d8acd064bafb2416feba757ba0d0fbc. Change-Id: If1603c1563772dd1d156dc6d9bcddbf58aa721c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107241 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/scheduler.cxx3
-rw-r--r--vcl/source/app/svapp.cxx1
2 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index f9fc3dc01fc6..9ae60f3f344d 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -124,7 +124,10 @@ void Scheduler::ImplDeInitScheduler()
"DeInit the scheduler - pending tasks: " << nTasks );
// clean up all the sfx::SfxItemDisruptor_Impl Idles
+ sal_uInt32 nLockCount = Unlock(true);
+ assert(1 == nLockCount);
ProcessEventsToIdle();
+ Lock(nLockCount);
#endif
rSchedCtx.mbActive = false;
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 0b30a0b6b688..f91375e77edd 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -462,7 +462,6 @@ bool Application::Reschedule( bool i_bAllEvents )
void Scheduler::ProcessEventsToIdle()
{
- SchedulerGuardReleaser aReleaser;
int nSanity = 1;
while( Application::Reschedule( true ) )
{