174 |
pThread->mutex.Unlock(); |
pThread->mutex.Unlock(); |
175 |
} |
} |
176 |
|
|
177 |
#ifdef __APPLE__ |
#if defined(__APPLE__) && !defined(__x86_64__) |
178 |
int InstrumentManagerThread::StopThread() { |
int InstrumentManagerThread::StopThread() { |
179 |
// This is a fix for Mac OS X, where SignalStopThread doesn't |
// This is a fix for Mac OS X 32 bit, where SignalStopThread |
180 |
// wake up a thread waiting for a condition variable. |
// doesn't wake up a thread waiting for a condition variable. |
181 |
SignalStopThread(); // send stop signal, but don't wait |
SignalStopThread(); // send stop signal, but don't wait |
182 |
conditionJobsLeft.Set(true); // wake thread |
conditionJobsLeft.Set(true); // wake thread |
183 |
return Thread::StopThread(); // then wait for it to cancel |
return Thread::StopThread(); // then wait for it to cancel |