mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-18 07:32:18 +02:00
Merge remote-tracking branch 'pocoproject@github/pr/1113' into pr/1113
This commit is contained in:
commit
2e4a679cca
@ -19,6 +19,6 @@ objects = PostgreSQLTestSuite Driver PostgreSQLTest SQLExecutor
|
||||
|
||||
target = testrunner
|
||||
target_version = 1
|
||||
target_libs = PocoDataPostgreSQL PocoData PocoFoundation CppUnit
|
||||
target_libs = PocoDataPostgreSQL PocoData PocoFoundation PocoCppUnit
|
||||
|
||||
include $(POCO_BASE)/build/rules/exec
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
TaskList taskList() const;
|
||||
/// Returns a copy of the internal task list.
|
||||
|
||||
int count() const;
|
||||
std::size_t count() const;
|
||||
/// Returns the number of tasks in the internal task list.
|
||||
|
||||
void addObserver(const AbstractObserver& observer);
|
||||
@ -125,11 +125,11 @@ private:
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline int TaskManager::count() const
|
||||
inline std::size_t TaskManager::count() const
|
||||
{
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
|
||||
return (int) _taskList.size();
|
||||
return _taskList.size();
|
||||
}
|
||||
|
||||
|
||||
|
@ -115,11 +115,12 @@ void TaskManager::taskStarted(Task* pTask)
|
||||
|
||||
void TaskManager::taskProgress(Task* pTask, float progress)
|
||||
{
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
ScopedLockWithUnlock<FastMutex> lock(_mutex);
|
||||
|
||||
if (_lastProgressNotification.isElapsed(MIN_PROGRESS_NOTIFICATION_INTERVAL))
|
||||
{
|
||||
_lastProgressNotification.update();
|
||||
lock.unlock();
|
||||
_nc.postNotification(new TaskProgressNotification(pTask, progress));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user