2015-02-26 01:33:59 -06:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INCLUDED_VCL_SCHEDULER_HXX
|
|
|
|
#define INCLUDED_VCL_SCHEDULER_HXX
|
|
|
|
|
|
|
|
#include <vcl/dllapi.h>
|
|
|
|
|
2015-11-25 04:35:37 -06:00
|
|
|
struct ImplSchedulerData;
|
2015-06-03 02:23:44 -05:00
|
|
|
|
2015-02-26 01:33:59 -06:00
|
|
|
enum class SchedulerPriority {
|
2016-01-12 10:36:49 -06:00
|
|
|
HIGHEST = 0,
|
|
|
|
HIGH = 1,
|
|
|
|
RESIZE = 2,
|
|
|
|
REPAINT = 3,
|
|
|
|
MEDIUM = 3,
|
|
|
|
POST_PAINT = 4,
|
|
|
|
DEFAULT_IDLE = 5,
|
|
|
|
LOW = 6,
|
|
|
|
LOWER = 7,
|
|
|
|
LOWEST = 8
|
2015-02-26 01:33:59 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
class VCL_DLLPUBLIC Scheduler
|
|
|
|
{
|
|
|
|
protected:
|
2015-06-10 06:08:00 -05:00
|
|
|
ImplSchedulerData* mpSchedulerData; /// Pointer to element in scheduler list
|
|
|
|
const sal_Char *mpDebugName; /// Useful for debugging
|
|
|
|
SchedulerPriority mePriority; /// Scheduler priority
|
|
|
|
bool mbActive; /// Currently in the scheduler
|
2015-02-26 01:33:59 -06:00
|
|
|
|
2015-07-19 18:40:18 -05:00
|
|
|
// These should be constexpr static, when supported.
|
|
|
|
static const sal_uInt64 ImmediateTimeoutMs = 1;
|
2016-05-30 10:36:37 -05:00
|
|
|
static const sal_uInt64 InfiniteTimeoutMs = 1000 * 60 * 60 * 24; // 1 day
|
2015-07-19 18:40:18 -05:00
|
|
|
|
2015-09-08 10:58:32 -05:00
|
|
|
static void ImplStartTimer(sal_uInt64 nMS, bool bForce = false);
|
2015-07-19 18:40:18 -05:00
|
|
|
|
2015-02-26 01:33:59 -06:00
|
|
|
friend struct ImplSchedulerData;
|
|
|
|
virtual void SetDeletionFlags();
|
2016-01-07 20:53:13 -06:00
|
|
|
/// Is this item ready to be dispatched at nTimeNow
|
2016-09-06 03:44:05 -05:00
|
|
|
virtual bool ReadyForSchedule( bool bIdle, sal_uInt64 nTimeNow ) const = 0;
|
2015-11-25 15:33:15 -06:00
|
|
|
/// Schedule only when other timers and events are processed
|
|
|
|
virtual bool IsIdle() const = 0;
|
|
|
|
/**
|
2016-01-07 20:53:13 -06:00
|
|
|
* Adjust nMinPeriod downwards if we want to be notified before
|
|
|
|
* then, nTimeNow is the current time.
|
2015-11-25 15:33:15 -06:00
|
|
|
*/
|
|
|
|
virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTimeNow ) const = 0;
|
2015-02-26 01:33:59 -06:00
|
|
|
|
|
|
|
public:
|
2016-09-14 05:26:36 -05:00
|
|
|
Scheduler( const sal_Char *pDebugName );
|
2015-02-26 01:33:59 -06:00
|
|
|
Scheduler( const Scheduler& rScheduler );
|
|
|
|
virtual ~Scheduler();
|
|
|
|
|
2015-07-19 18:40:18 -05:00
|
|
|
void SetPriority(SchedulerPriority ePriority) { mePriority = ePriority; }
|
2015-03-06 04:13:53 -06:00
|
|
|
SchedulerPriority GetPriority() const { return mePriority; }
|
2015-02-26 01:33:59 -06:00
|
|
|
|
2015-06-10 06:08:00 -05:00
|
|
|
void SetDebugName( const sal_Char *pDebugName ) { mpDebugName = pDebugName; }
|
2015-11-25 15:38:34 -06:00
|
|
|
const char *GetDebugName() { return mpDebugName; }
|
2015-06-10 06:08:00 -05:00
|
|
|
|
2015-03-06 04:13:53 -06:00
|
|
|
// Call handler
|
2015-02-26 01:33:59 -06:00
|
|
|
virtual void Invoke() = 0;
|
|
|
|
|
|
|
|
virtual void Start();
|
2015-06-09 01:55:13 -05:00
|
|
|
void Stop();
|
2015-02-26 01:33:59 -06:00
|
|
|
|
|
|
|
bool IsActive() const { return mbActive; }
|
|
|
|
|
2015-07-19 18:40:18 -05:00
|
|
|
Scheduler& operator=( const Scheduler& rScheduler );
|
Revert "std::list for Scheduler"
This reverts commit 1289d3c42af66990a2c8e5a7a38e51b6cd51c7eb, plus follow-ups
762e90ffa0cd5f85dadd9bad93391d105e60e418 "vcl: loplugin:pointertobool" and
863e5685dda88efd0bee3177a08eedffd4730e33 "Fix funny line-ends," as it causes
memory corruption, see valgrind "make CppunitTest_sw_ooxmlexport4" output:
> Invalid write of size 1
> Scheduler::ImplInvoke(unsigned long) (/vcl/source/app/scheduler.cxx:40)
> Scheduler::ProcessTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:128)
> Scheduler::CallbackTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:112)
> SalTimer::CallCallback(bool) (/vcl/inc/saltimer.hxx:53)
> SvpSalInstance::CheckTimeout(bool) (/vcl/headless/svpinst.cxx:191)
> SvpSalInstance::Yield(bool, bool) (/vcl/headless/svpinst.cxx:307)
> ImplYield(bool, bool) (/vcl/source/app/svapp.cxx:353)
> Application::Reschedule(bool) (/vcl/source/app/svapp.cxx:377)
> framework::StatusIndicatorFactory::impl_reschedule(bool) (/framework/source/helper/statusindicatorfactory.cxx:528)
> framework::StatusIndicatorFactory::end(com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator> const&) (/framework/source/helper/statusindicatorfactory.cxx:229)
> framework::StatusIndicator::end() (/framework/source/helper/statusindicator.cxx:70)
> non-virtual thunk to framework::StatusIndicator::end() (/framework/source/helper/statusindicator.cxx:57)
> writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) (/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:531)
> WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/writerfilter/source/filter/WriterFilter.cxx:191)
> non-virtual thunk to WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/writerfilter/source/filter/WriterFilter.cxx:126)
> SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) (/sfx2/source/doc/objstor.cxx:2271)
> SfxObjectShell::DoLoad(SfxMedium*) (/sfx2/source/doc/objstor.cxx:767)
> SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/sfx2/source/doc/sfxbasemodel.cxx:1859)
> non-virtual thunk to SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/sfx2/source/doc/sfxbasemodel.cxx:1810)
> (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (/sfx2/source/view/frmload.cxx:703)
> non-virtual thunk to (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (/sfx2/source/view/frmload.cxx:615)
> framework::LoadEnv::impl_loadContent() (/framework/source/loadenv/loadenv.cxx:1122)
> framework::LoadEnv::startLoading() (/framework/source/loadenv/loadenv.cxx:383)
> framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/loadenv/loadenv.cxx:164)
> framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/services/desktop.cxx:566)
> non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/services/desktop.cxx:552)
> unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/unotest/source/cpp/macros_test.cxx:50)
> SwModelTestBase::load(char const*, char const*) (/sw/qa/extras/inc/swmodeltestbase.hxx:580)
> SwModelTestBase::executeImportExportImportTest(char const*) (/sw/qa/extras/inc/swmodeltestbase.hxx:219)
> testTrackChangesDeletedParagraphMark::Import_Export_Import() (/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx:132)
> CppUnit::TestCaller<testTrackChangesDeletedParagraphMark>::runTest() (/workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:166)
> CppUnit::TestCaseMethodFunctor::operator()() const (/workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32)
> (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/test/source/vclbootstrapprotector.cxx:57)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/sbergman/lo/core/workdir/LinkTarget/Library/unobootstrapprotector.so)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:77)
> CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:181)
> CppUnit::TestCase::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91)
> CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64)
> CppUnit::TestComposite::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23)
> CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64)
> CppUnit::TestComposite::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23)
> CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47)
> CppUnit::TestResult::runTest(CppUnit::Test*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:148)
> CppUnit::TestRunner::run(CppUnit::TestResult&, std::string const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96)
> Address 0x2c9ece48 is 40 bytes inside a block of size 104 free'd
> operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> (anonymous namespace)::ImpTimedRefDev::~ImpTimedRefDev() (/drawinglayer/source/primitive2d/textlayoutdevice.cxx:84)
> std::default_delete<(anonymous namespace)::ImpTimedRefDev>::operator()((anonymous namespace)::ImpTimedRefDev*) const (/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/bits/unique_ptr.h:76)
> std::unique_ptr<(anonymous namespace)::ImpTimedRefDev, std::default_delete<(anonymous namespace)::ImpTimedRefDev> >::reset((anonymous namespace)::ImpTimedRefDev*) (/usr/lib/gcc/x86_64-redhat-linux/4.9.2/../../../../include/c++/4.9.2/bits/unique_ptr.h:344)
> comphelper::unique_disposing_ptr<(anonymous namespace)::ImpTimedRefDev>::reset((anonymous namespace)::ImpTimedRefDev*) (/include/comphelper/unique_disposing_ptr.hxx:41)
> (anonymous namespace)::ImpTimedRefDev::Invoke() (/drawinglayer/source/primitive2d/textlayoutdevice.cxx:93)
> Scheduler::ImplInvoke(unsigned long) (/vcl/source/app/scheduler.cxx:39)
> Scheduler::ProcessTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:128)
> Scheduler::CallbackTaskScheduling(bool) (/vcl/source/app/scheduler.cxx:112)
> SalTimer::CallCallback(bool) (/vcl/inc/saltimer.hxx:53)
> SvpSalInstance::CheckTimeout(bool) (/vcl/headless/svpinst.cxx:191)
> SvpSalInstance::Yield(bool, bool) (/vcl/headless/svpinst.cxx:307)
> ImplYield(bool, bool) (/vcl/source/app/svapp.cxx:353)
> Application::Reschedule(bool) (/vcl/source/app/svapp.cxx:377)
> framework::StatusIndicatorFactory::impl_reschedule(bool) (/framework/source/helper/statusindicatorfactory.cxx:528)
> framework::StatusIndicatorFactory::end(com::sun::star::uno::Reference<com::sun::star::task::XStatusIndicator> const&) (/framework/source/helper/statusindicatorfactory.cxx:229)
> framework::StatusIndicator::end() (/framework/source/helper/statusindicator.cxx:70)
> non-virtual thunk to framework::StatusIndicator::end() (/framework/source/helper/statusindicator.cxx:57)
> writerfilter::ooxml::OOXMLDocumentImpl::resolve(writerfilter::Stream&) (/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx:531)
> WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/writerfilter/source/filter/WriterFilter.cxx:191)
> non-virtual thunk to WriterFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/writerfilter/source/filter/WriterFilter.cxx:126)
> SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) (/sfx2/source/doc/objstor.cxx:2271)
> SfxObjectShell::DoLoad(SfxMedium*) (/sfx2/source/doc/objstor.cxx:767)
> SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/sfx2/source/doc/sfxbasemodel.cxx:1859)
> non-virtual thunk to SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/sfx2/source/doc/sfxbasemodel.cxx:1810)
> (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (/sfx2/source/view/frmload.cxx:703)
> non-virtual thunk to (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) (/sfx2/source/view/frmload.cxx:615)
> framework::LoadEnv::impl_loadContent() (/framework/source/loadenv/loadenv.cxx:1122)
> framework::LoadEnv::startLoading() (/framework/source/loadenv/loadenv.cxx:383)
> framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/loadenv/loadenv.cxx:164)
> framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/services/desktop.cxx:566)
> non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/framework/source/services/desktop.cxx:552)
> unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (/unotest/source/cpp/macros_test.cxx:50)
> SwModelTestBase::load(char const*, char const*) (/sw/qa/extras/inc/swmodeltestbase.hxx:580)
> SwModelTestBase::executeImportExportImportTest(char const*) (/sw/qa/extras/inc/swmodeltestbase.hxx:219)
> testTrackChangesDeletedParagraphMark::Import_Export_Import() (/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx:132)
> CppUnit::TestCaller<testTrackChangesDeletedParagraphMark>::runTest() (/workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:166)
> CppUnit::TestCaseMethodFunctor::operator()() const (/workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32)
> (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/test/source/vclbootstrapprotector.cxx:57)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (in /home/sbergman/lo/core/workdir/LinkTarget/Library/unobootstrapprotector.so)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:63)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15)
> CppUnit::ProtectorChain::ProtectFunctor::operator()() const (in /home/sbergman/lo/core/workdir/UnpackedTarball/cppunit/src/cppunit/.libs/libcppunit-1.13.so.0.0.2)
> CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:77)
> CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::string const&) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:181)
> CppUnit::TestCase::run(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:91)
> CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) (/workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64)
2015-06-15 07:22:08 -05:00
|
|
|
static void ImplDeInitScheduler();
|
2015-02-26 01:33:59 -06:00
|
|
|
|
2016-05-30 10:36:37 -05:00
|
|
|
/// Process one pending Timer with highhest priority
|
2015-03-04 08:13:52 -06:00
|
|
|
static void CallbackTaskScheduling( bool ignore );
|
2015-11-23 15:44:36 -06:00
|
|
|
/// Calculate minimum timeout - and return its value.
|
2015-11-24 10:59:29 -06:00
|
|
|
static sal_uInt64 CalculateMinimumTimeout( bool &bHasActiveIdles );
|
2015-11-26 04:42:10 -06:00
|
|
|
/// Process one pending task ahead of time with highest priority.
|
2016-09-06 03:44:05 -05:00
|
|
|
static bool ProcessTaskScheduling( bool bIdle );
|
2015-11-26 04:42:10 -06:00
|
|
|
/// Process all events until we are idle
|
|
|
|
static void ProcessEventsToIdle();
|
2016-05-30 10:36:37 -05:00
|
|
|
|
|
|
|
/// Control the deterministic mode. In this mode, two subsequent runs of
|
|
|
|
/// LibreOffice fire about the same amount idles.
|
|
|
|
static void SetDeterministicMode(bool bDeterministic);
|
|
|
|
/// Return the current state of deterministic mode.
|
|
|
|
static bool GetDeterministicMode();
|
2015-02-26 01:33:59 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDED_VCL_SCHEDULER_HXX
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|