tf.compat.v1.train.QueueRunner

Holds a list of enqueue operations for a queue, each to be run in a thread.

Queues are a convenient TensorFlow mechanism to compute tensors asynchronously using multiple threads. For example in the canonical 'Input Reader' setup one set of threads generates filenames in a queue; a second set of threads read records from the files, processes them, and enqueues tensors on a second queue; a third set of threads dequeues these input records to construct batches and runs them through training operations.

There are several delicate issues when running multiple threads that way: closing the queues in sequence as the input is exhausted, correctly catching and reporting exceptions, etc.

The QueueRunner, combined with the Coordinator, helps handle these issues.

queue A Queue.
enqueue_ops List of enqueue ops to run in threads later.
close_op Op to close the queue. Pending enqueue ops are preserved.
cancel_op Op to close the queue and cancel pending enqueue ops.
queue_closed_exception_types Optional tuple of Exception types that indicate that the queue has been closed when raised during an enqueue operation.