| 120 | } |
| 121 | |
| 122 | bool Thread::isAlive() |
| 123 | { |
| 124 | if(mData->mThreadID == 0) |
| 125 | return false; |
| 126 | |
| 127 | if( mData->mGateway.acquire(false) ) |
| 128 | { |
| 129 | mData->mGateway.release(); |
| 130 | return false; // we got the lock, it aint alive. |
| 131 | } |
| 132 | else |
| 133 | return true; // we could not get the lock, it must be alive. |
| 134 | } |
| 135 | |
| 136 | ThreadIdent Thread::getId() |
| 137 | { |