def write(self, bytestring):
        '''Enqueue the given bytes to be written asychronously'''
        with self._lock:
            if self._closed:
                raise IOError('Writer is closed')
            self._byte_queue.put(bytestring)