path: root/vcl/win/app/salinst.cxx
diff options
authorJan-Marek Glogowski <>2018-08-24 08:05:26 +0200
committerChristian Lohmaier <>2018-10-03 15:48:06 +0200
commit36556f2f2c30c10f34d5495a7f7cc735b9b9417a (patch)
treee6a6a3776a7ce13cf937a4012ce996e686a22fcc /vcl/win/app/salinst.cxx
parentcc360c414d9c9e16ca039300c57fd941d68d66ad (diff)
tdf#119458 reorganize sw background Idle handling
This is the squashed version of the following commits: - ce68889678bc tdf#119458 always start the SwDocIdle - 107f0e6dba57 tdf#119458 fix sw background Idle state handling - 771544544ee1 tdf#119458 fix sw background Idle unblocking - 3bd8316718fd tdf#119458 just wakeup Scheduler on active Idle While the first commit was really wrong, the third is just an optimization to prevent unnecessary wakeups and Idle task interrups from new calls to StartIdling(). The 4th one contains the reset of the Idle state on run, which was probably the main origin of the problem and allows to wake up the Scheduler without moving the Task to the end of the queue. Starting the SwDocIdle in StartIdeling() just reintroduces the bug fixed in commit 401cba4c20fb ("tdf#116370 cleanup Writer idle job handing"), so trading one bug for the other. For the real solution we have to handle two states: 1. The SwDocIdle being active 2. The SwDocIdle being blocked For the first state we can just use the active state of the Idle itself. Since it's not a AutoIdle, it will be turned of, if invoked. Either some Idle handler will want to be run it again or some other thread might start it again, if needed. Since we're now tracking the wanted Idle state via the active task flag, we can drop the explicit mbStartIdleTimer handling. As a result of the first change, we can't stop the Idle anymore when blocking it. But the Idle itself checks its ready state via IsDocIdle() in its UpdateMinPeriod function, so we have to add the blocking state to IsDocIdle(). But we can't handle the correct state when blocking via a tasks mbActive bool, as this also schedules the task and starts the scheduler timer. So reintroduce a bool for the unblock state. This should prevent fdo#73165, which I couldn't reproduce, but just to be sure. More importantly this patch resets the m_bStartOnUnblock when the Idle job actually runs. This run should already determinates if more Idle work needs to be done, and others can still call BeginIdling() to ensure further processing. Reviewed-by: Jan-Marek Glogowski <> Tested-by: Jenkins Reviewed-on: (cherry picked from commit ce68889678bca3b51c258452f7bfdd21982e4a0d) Reviewed-on: (cherry picked from commit 107f0e6dba57a5b27366a35a5cdb184079546df0) Reviewed-on: (cherry picked from commit 771544544ee13ec98961f93b5313a7d2e29429cd) Reviewed-on: (cherry picked from commit 3bd8316718fdfed454c01a9c4ae6af6beb34437d) Change-Id: I2d4328f31644017b09786ff4cba45cf7643f0a4b (cherry picked from commit f1fb30cf43eda45137ab96177238a29c3725789d) Reviewed-on: Tested-by: Jenkins Reviewed-by: Caolán McNamara <> Tested-by: Caolán McNamara <> (cherry picked from commit 20e46a6ca5b62f7177f799eae9e0f26e659fd03b) Reviewed-on: Reviewed-by: Christian Lohmaier <> Reviewed-by: Tomaž Vajngerl <> Reviewed-by: Xisco Faulí <> Tested-by: Xisco Faulí <> (cherry picked from commit 3abec366a3fdb8657d69e24b69b4338121f80b22) Reviewed-on:
Diffstat (limited to 'vcl/win/app/salinst.cxx')
0 files changed, 0 insertions, 0 deletions