mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-15 07:14:46 +02:00
fix comment; don't send TaskProgressNotification if progress does not change
Conflicts: Foundation/src/Task.cpp
This commit is contained in:
@@ -102,7 +102,7 @@ private:
|
|||||||
|
|
||||||
class Foundation_API TaskProgressNotification: public TaskNotification
|
class Foundation_API TaskProgressNotification: public TaskNotification
|
||||||
/// This notification is posted by the TaskManager for
|
/// This notification is posted by the TaskManager for
|
||||||
/// every task that has failed with an exception.
|
/// a task when its progress changes.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TaskProgressNotification(Task* pTask, float progress);
|
TaskProgressNotification(Task* pTask, float progress);
|
||||||
|
@@ -95,9 +95,12 @@ void Task::setProgress(float progress)
|
|||||||
{
|
{
|
||||||
FastMutex::ScopedLock lock(_mutex);
|
FastMutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
_progress = progress;
|
if (_progress != taskProgress)
|
||||||
|
{
|
||||||
|
_progress = taskProgress;
|
||||||
if (_pOwner)
|
if (_pOwner)
|
||||||
_pOwner->taskProgress(this, _progress);
|
_pOwner->taskProgress(this, _progress);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user