diff options
author | megamage <none@none> | 2009-02-18 11:36:19 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-18 11:36:19 -0600 |
commit | 31637d4aac6ae2081ccb3db976cab17936019f1a (patch) | |
tree | a0e098d4afafaddcb901486d00da1563ecd628b9 /dep/src/zthread/Thread.cxx | |
parent | 017f309b5b5b981b6edfe0ae071971d513828a20 (diff) | |
parent | 7bff1c1d60b78ba78f2ab0a9c67bdde80427ea30 (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'dep/src/zthread/Thread.cxx')
-rw-r--r-- | dep/src/zthread/Thread.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/dep/src/zthread/Thread.cxx b/dep/src/zthread/Thread.cxx index 25cde79969c..5ed7fc3e998 100644 --- a/dep/src/zthread/Thread.cxx +++ b/dep/src/zthread/Thread.cxx @@ -27,20 +27,20 @@ namespace ZThread { - Thread::Thread() - : _impl( ThreadImpl::current() ) { + Thread::Thread() + : _impl( ThreadImpl::current() ) { - // ThreadImpl's start out life with a reference count + // ThreadImpl's start out life with a reference count // of one, and the they are added to the ThreadQueue. _impl->addReference(); - + } Thread::Thread(const Task& task, bool autoCancel) - : _impl( new ThreadImpl(task, autoCancel) ) { - + : _impl( new ThreadImpl(task, autoCancel) ) { + _impl->addReference(); - + } bool Thread::operator==(const Thread& t) const { @@ -94,7 +94,7 @@ namespace ZThread { return _impl->interrupt(); } - + void Thread::cancel() { if(ThreadImpl::current() == _impl) @@ -102,7 +102,7 @@ namespace ZThread { _impl->cancel(); - } + } bool Thread::isCanceled() { @@ -124,4 +124,4 @@ namespace ZThread { } -} // namespace ZThread +} // namespace ZThread |