diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-21 12:09:59 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-21 12:09:59 (GMT) |
| commit | 5bf0a084ace0e6b673efa4552b40de8b36e0668e (patch) | |
| tree | 8683ff6c11167cb3b95f7b4ae65269b3cb6dce98 /src/tasks | |
| parent | 78b1ffb11dc78130cdb120acf37d5930807bff6c (diff) | |
| download | powder-5bf0a084ace0e6b673efa4552b40de8b36e0668e.zip powder-5bf0a084ace0e6b673efa4552b40de8b36e0668e.tar.gz | |
Prevent race condition when reloading local stamps, fix task so "after()" gets called and correct stamp name so they actually get deleted"
Diffstat (limited to 'src/tasks')
| -rw-r--r-- | src/tasks/Task.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tasks/Task.cpp b/src/tasks/Task.cpp index b2ded16..8ab0ded 100644 --- a/src/tasks/Task.cpp +++ b/src/tasks/Task.cpp @@ -86,16 +86,15 @@ void Task::Poll() notifyStatusMain(); } - if(done) + if(newDone!=done) { + done = newDone; + pthread_join(doWorkThread, NULL); pthread_mutex_destroy(&taskMutex); + after(); - } - - if(newDone!=done) - { - done = newDone; + notifyDoneMain(); } } |
