portage.util.futures._asyncio.streams module

class portage.util.futures._asyncio.streams._Reader(future, input_file, loop)

Bases: object

_cancel()
_cancel_callback(future)
_eof(pipe_reader)
portage.util.futures._asyncio.streams._reader(input_file, loop=None)

Asynchronously read a binary input file, and close it when it reaches EOF.

Parameters
  • input_file (file or int) – binary input file descriptor

  • loop (event loop) – asyncio.AbstractEventLoop (or compatible)

Returns

bytes

Return type

asyncio.Future (or compatible)

async portage.util.futures._asyncio.streams._writer(output_file, content, loop=<class 'DeprecationWarning'>)

Asynchronously write bytes to output file. The output file is assumed to be in non-blocking mode. If an EnvironmentError other than EAGAIN is encountered, which typically indicates that the other end of the pipe has closed, the error is raised. This function is a coroutine.

Parameters
  • output_file (file object) – output file

  • content (bytes) – content to write

  • loop – deprecated