summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-03-13 01:23:36 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2019-03-14 12:34:32 +0100
commitffcff2fe24ce1fd64b7c45073c09f6d5a5a5d51d (patch)
tree53cef736da5e1830f6207495ec6ead3e5ec17720 /include/vcl
parent8bc23968129fc38d70fb614668a411599d4e6d0e (diff)
Fix scheduled Task priority change handling
If a task is still in the scheduler priority queue and its priority is changed, it won't be moved into the correct queue. We have to track the priority of the scheduled task, so we can warn the developer to fix the code and actually handle re-start correctly. Since we don't want to traverse the whole Scheduler queues on priority change (which sometimes get very long) to remove the wrong data item, we'll just invalidate it, if a priority change is detected. This also reverts commit d24b264c4a47 ("vcl opengl: avoid task priority warning on cursor blink"), which tried to avoid the warning, which was just half right and independent of the broken priority change handling. LO doesn't change priorities of scheduled tasks normally, so that bug didn't turn out to have much impact, I guess. Change-Id: I6e46b518a7c3532047c619c013bd8597f73ed7a6 Reviewed-on: https://gerrit.libreoffice.org/69249 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/task.hxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/include/vcl/task.hxx b/include/vcl/task.hxx
index f5af890e2f57..9bc8b5c9bf2d 100644
--- a/include/vcl/task.hxx
+++ b/include/vcl/task.hxx
@@ -77,7 +77,7 @@ public:
virtual ~Task() COVERITY_NOEXCEPT_FALSE;
Task& operator=( const Task& rTask );
- inline void SetPriority(TaskPriority ePriority);
+ void SetPriority(TaskPriority ePriority);
TaskPriority GetPriority() const { return mePriority; }
void SetDebugName( const sal_Char *pDebugName ) { mpDebugName = pDebugName; }
@@ -101,13 +101,6 @@ public:
bool IsStatic() const { return mbStatic; }
};
-inline void Task::SetPriority(TaskPriority ePriority)
-{
- SAL_WARN_IF(mpSchedulerData, "vcl.schedule",
- "Priority will just change after next schedule!");
- mePriority = ePriority;
-}
-
#endif // INCLUDED_VCL_TASK_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */