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