diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-10-16 16:59:45 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2017-10-20 10:45:58 +0200 |
commit | 47ee8098a90a35626dcace7422a9a624c8469389 (patch) | |
tree | 15bd87d280036aec701328ee8c770e3c4c9de138 /vcl/README.scheduler | |
parent | 9466ea1af09c275f423b0d5c1ad929984ed998b3 (diff) |
WIN guarantee direct timeout handling
The code did acccount processing of an invaild timeout system
message as a valid timeout event.
Change-Id: I3c31f8b9cec592631b4089411163dadecffde816
Reviewed-on: https://gerrit.libreoffice.org/43529
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/README.scheduler')
-rw-r--r-- | vcl/README.scheduler | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/vcl/README.scheduler b/vcl/README.scheduler index 17648ae3b439..80c14b032c54 100644 --- a/vcl/README.scheduler +++ b/vcl/README.scheduler @@ -89,6 +89,35 @@ can be added to the scheduler reasonably. = Implementation details = +== General: event priority for DoYield == + +There are three types of events, with different priority: + +1. LO user events +2. System events +3. LO Scheduler event + +They should be processed according to the following code: + +bool DoYield( bool bWait, bool bAllCurrent ) +{ + bool bWasEvent = ProcessUserEvents( bAllCurrent ); + if ( !bAllCurrent && bWasEvent ) + return true; + bWasEvent = ProcessSystemEvents( bAllCurrent, &bWasSchedulerEvent ) || bWasEvent; + if ( !bWasSchedulerEvent && IsSchedulerEvent() ) + { + ProcessSchedulerEvent() + bWasEvent = true; + } + if ( !bWasEvent && bWait ) + { + WaitForSystemEvents(); + bWasEvent = true; + } + return bWasEvent; +} + == General: main thread deferral == Currently for Mac and Windows, we run main thread deferrals by disabling the |