| 14 | Delegate<Thread*, int32> ThreadBase::ThreadExiting; |
| 15 | |
| 16 | ThreadBase::ThreadBase(IRunnable* runnable, const String& name, ThreadPriority priority) |
| 17 | : _runnable(runnable) |
| 18 | , _priority(priority) |
| 19 | , _name(name) |
| 20 | , _id(0) |
| 21 | , _isRunning(false) |
| 22 | , _callAfterWork(true) |
| 23 | { |
| 24 | ASSERT(_runnable); |
| 25 | |
| 26 | #if BUILD_DEBUG |
| 27 | // Cache name (in case if object gets deleted somewhere) |
| 28 | _runnableName = _runnable->ToString(); |
| 29 | #endif |
| 30 | } |
| 31 | |
| 32 | void ThreadBase::SetPriority(ThreadPriority priority) |
| 33 | { |