diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-01-26 15:55:26 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-01-26 16:07:43 -0800 |
commit | 8845387fc6e8eb476bb42e620bd86b263bda41b9 (patch) | |
tree | d5965c77f78b64f521489a7b5fd1df939b88affa /tensorflow/stream_executor/host | |
parent | b80fce2f901ac393cd7edcbe484221c95ff5ba90 (diff) |
Change the way the host platform stream blocks so that it is usable with a condition variable implementation that doesn't support waiting with a predicate.
Remove unnecessary ToString calls in cuda_gpu_executor.cc.
Minor tweaks to header inclusions which should have no effect on code behavior.
Change: 145732882
Diffstat (limited to 'tensorflow/stream_executor/host')
-rw-r--r-- | tensorflow/stream_executor/host/host_stream.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/stream_executor/host/host_stream.cc b/tensorflow/stream_executor/host/host_stream.cc index c81ca406b8..5961c31516 100644 --- a/tensorflow/stream_executor/host/host_stream.cc +++ b/tensorflow/stream_executor/host/host_stream.cc @@ -46,9 +46,9 @@ bool HostStream::EnqueueTask(std::function<void()> task) { void HostStream::BlockUntilDone() { mutex_lock lock(mu_); - completion_condition_.wait(lock, [this]() { - return pending_tasks_ == 0; - }); + while (pending_tasks_ != 0) { + completion_condition_.wait(lock); + } } } // namespace host |