def write(self, chunk):
if self.is_closed:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if compat.is_basestring(chunk):<EOL><INDENT>self.queue.put(chunk)<EOL><DEDENT>else:  <EOL><INDENT>for o in chunk:<EOL><INDENT>self.queue.put(o)<EOL><DEDENT><DEDENT>
Put a chunk of bytes (or an iterable) to the queue.

        May block if max_size number of chunks is reached.