diff options
| author | Pixel <pixel@nobis-crew.org> | 2012-04-08 16:59:02 -0700 | 
|---|---|---|
| committer | Pixel <pixel@nobis-crew.org> | 2012-04-08 16:59:09 -0700 | 
| commit | b207b82b663ff05db3872d80b6b9acc831334f31 (patch) | |
| tree | 556992bd9636deaffb32eb6afcf56604e49a7326 /src/Task.cc | |
| parent | ca8545b1639f0f33f99b2ce3969874ccc7a79d62 (diff) | |
Making TaskEvents being able to be re-used for different tasks.
Diffstat (limited to 'src/Task.cc')
| -rw-r--r-- | src/Task.cc | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/src/Task.cc b/src/Task.cc index 52e9fa2..f01bb18 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -192,6 +192,7 @@ Balau::Events::TaskEvent::TaskEvent(Task * taskWaited) : m_taskWaited(NULL), m_a  void Balau::Events::TaskEvent::attachToTask(Task * taskWaited) {      AAssert(!m_taskWaited, "You can't attach a TaskEvent twice."); +    m_ack = false;      m_taskWaited = taskWaited;      ScopeLock lock(m_taskWaited->m_eventLock);      m_taskWaited->m_waitedBy.push_back(this); @@ -242,6 +243,7 @@ void Balau::Events::TaskEvent::ack() {      IAssert(deleted, "We didn't find task %p in the waitedBy lists... ?", this);      m_ack = true;      reset(); +    m_taskWaited = NULL;  }  void Balau::Events::Timeout::gotOwner(Task * task) { | 
