def get_queue(self, path, n_procs=<NUM_LIT:4>, read_ahead=None, cyclic=False, block_size=None, ordered=False):
<EOL>example = self.__get_batch(path, block_size)<EOL>block_size = example.shape[<NUM_LIT:0>]<EOL>if read_ahead is None:<EOL><INDENT>read_ahead = <NUM_LIT:2>*n_procs + <NUM_LIT:1><EOL><DEDENT>cbuf = SharedCircBuf(read_ahead, example)<EOL>stop = multiprocessing.Event()<EOL>barrier = Barrier(n_procs)<EOL>sync = GuardSynchronizer() if ordered else None<EOL>procs = []<EOL>for i in range(n_procs):<EOL><INDENT>process = multiprocessing.Process(target=_Streamer__read_process, args=(<EOL>self, path, block_size, cbuf, stop, barrier, cyclic,<EOL>i * block_size, n_procs * block_size, sync<EOL>))<EOL>process.daemon = True<EOL>process.start()<EOL>procs.append(process)<EOL><DEDENT>if not cyclic:<EOL><INDENT>def monitor():<EOL><INDENT>for p in procs:<EOL><INDENT>p.join()<EOL><DEDENT>cbuf.close()<EOL><DEDENT>monitor_thread = threading.Thread(target=monitor)<EOL>monitor_thread.daemon = True<EOL>monitor_thread.start()<EOL><DEDENT>return Streamer.Queue(cbuf, stop, block_size)<EOL>
Get a queue that allows direct access to the internal buffer. If the dataset to be read is chunked, the
block_size should be a multiple of the chunk size to maximise performance. In this case it is best to leave it
to the default. When cyclic=False, and block_size does not divide the dataset evenly, the remainder elements
will not be returned by the queue. When cyclic=True, the remainder elements will be part of a block that wraps
around the end and includes element from the beginning of the dataset. By default, blocks are returned in the
order in which they become available. The ordered option will force blocks to be returned in on-disk order.

:param path: The HDF5 path to the dataset that should be read.
:param n_procs: The number of background processes used to read the datset in parallel.
:param read_ahead: The number of blocks to allocate in the internal buffer.
:param cyclic: True if the queue should wrap at the end of the dataset.
:param block_size: The size along the outer dimension of the blocks to be read. Defaults to a multiple of
    the chunk size, or to a 128KB sized block if the dataset is not chunked.
:param ordered: Force the reader return data in on-disk order. May result in performance penalty.
:return: A queue object that allows access to the internal buffer.