callback handler: don't need to wait for the thread to become ready

[ROCm/hip commit: d3a9985f10]
This commit is contained in:
Siu Chi Chan
2018-06-02 17:55:37 -04:00
parent eded0da7b5
commit 4b25b76898
-9
Vedi File
@@ -201,14 +201,5 @@ hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback
ihipStreamCallback_t* cb = new ihipStreamCallback_t(stream, callback, userData);
std::thread(ihipStreamCallbackHandler, cb).detach();
// Wait for thread to be ready
cb->_mtx.lock();
while (cb->_ready != true) {
cb->_mtx.unlock();
std::this_thread::sleep_for(std::chrono::milliseconds(10));
cb->_mtx.lock();
}
cb->_mtx.unlock();
return ihipLogStatus(e);
}