MCPcopy Index your code
hub / github.com/RustPython/RustPython / _writefd

Method _writefd

Lib/test/_test_multiprocessing.py:3558–3567  ·  view source on GitHub ↗
(cls, conn, data, create_dummy_fds=False)

Source from the content-addressed store, hash-verified

3556
3557 @classmethod
3558 def _writefd(cls, conn, data, create_dummy_fds=False):
3559 if create_dummy_fds:
3560 for i in range(0, 256):
3561 if not cls._is_fd_assigned(i):
3562 os.dup2(conn.fileno(), i)
3563 fd = reduction.recv_handle(conn)
3564 if msvcrt:
3565 fd = msvcrt.open_osfhandle(fd, os.O_WRONLY)
3566 os.write(fd, data)
3567 os.close(fd)
3568
3569 @unittest.skipUnless(HAS_REDUCTION, "test needs multiprocessing.reduction")
3570 def test_fd_transfer(self):

Callers

nothing calls this directly

Calls 4

_is_fd_assignedMethod · 0.80
filenoMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected