Commit 9c74fa8b authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

[tf.data] Switch iterator ops to use a simple non-blocking background worker.

In rare cases (e.g. under heavy load) `tensorflow::thread::ThreadPool::Schedule()` can block, because its fixed-length queue is full. In the iterator ops, we would rather pay the cost of one additional dynamic allocation per op invocation and never block. This fixes a potential deadlock when a closure is executed synchronously, blocks a thread-pool thread, and depends on its own blocked thread (or another thread in the same state) to make progress.

PiperOrigin-RevId: 205016675
parent ff4945f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment