'Read n bytes.
Returns exactly n bytes of data unless the underlying raw IO
stream reaches EOF or if the call would block in non-blocking
mode. If n is negative, read until EOF or until read() would
block.'

def read(self, n=None):

    if ((n is not None) and (n < (-1))):
        raise ValueError(u'invalid    number    of    bytes    to    read')
    with self._read_lock:
        return self._read_unlocked(n)
