def read(self, chunk_size):
        """Read data from the queue.

        This method blocks until data is available. The input chunk size is
        ignored since we have ensured that the data chunks written to the pipe
        by the image reader thread is the same as the chunks asked for by the
        image writer thread.
        """
        if (self._max_transfer_size is 0 or
                self._transferred < self._max_transfer_size):
            data_item = self.get()
            self._transferred += len(data_item)
            return data_item
        else:
            LOG.debug("Completed transfer of size %s.", self._transferred)
            return ""
dataset/ETHPy150Open openstack/oslo.vmware/oslo_vmware/image_transfer.py/BlockingQueue.read/original