MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / mt_interact

Method mt_interact

tools/python-3.11.9-amd64/Lib/telnetlib.py:565–573  ·  view source on GitHub ↗

Multithreaded version of interact().

(self)

Source from the content-addressed store, hash-verified

563 self.write(line)
564
565 def mt_interact(self):
566 """Multithreaded version of interact()."""
567 import _thread
568 _thread.start_new_thread(self.listener, ())
569 while 1:
570 line = sys.stdin.readline()
571 if not line:
572 break
573 self.write(line.encode('ascii'))
574
575 def listener(self):
576 """Helper for mt_interact() -- this executes in the other thread."""

Callers 1

interactMethod · 0.95

Calls 3

writeMethod · 0.95
readlineMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected