8c35227c6e3c4a6b85d2f719c9a62031f5e4ca6f,src/python/pants/java/nailgun_io.py,,_pipe,#Any#,19

Before Change


@contextmanager
def _pipe(isatty):
  r_fd, w_fd = os.openpty() if isatty else os.pipe()
  try:
    yield os.fdopen(r_fd, "r"), os.fdopen(w_fd, "w")
  finally:
    os.close(r_fd)
    os.close(w_fd)


class NailgunStreamStdinReader(threading.Thread):
  Reads Nailgun "stdin" chunks on a socket and writes them to an output file-like.

  Because a Nailgun server only ever receives STDIN and STDIN_EOF ChunkTypes after initial

After Change


@contextmanager
def _pipe(isatty):
  r_fd, w_fd = os.openpty() if isatty else os.pipe()
  with os.fdopen(r_fd, "r") as r, os.fdopen(w_fd, "w") as w:
    yield (r, w)


class _StoppableDaemonThread(threading.Thread):
  A stoppable daemon threading.Thread.

  JOIN_TIMEOUT = 3
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 8c35227c6e3c4a6b85d2f719c9a62031f5e4ca6f
Time: 2017-12-12
Author: kwlzn@users.noreply.github.com
File Name: src/python/pants/java/nailgun_io.py
Class Name:
Method Name: _pipe


Project Name: aws/sagemaker-python-sdk
Commit Name: fe29f60d58eb56b5571c01bf0f955f3f1cbfb196
Time: 2019-06-27
Author: mvs.usp@gmail.com
File Name: tests/integ/timeout.py
Class Name:
Method Name: timeout


Project Name: pantsbuild/pants
Commit Name: 68b64f050901cb96e492b4346359ad0c078ac6c2
Time: 2017-04-21
Author: benjyw@gmail.com
File Name: src/python/pants/backend/python/tasks2/pytest_run.py
Class Name: PytestRun
Method Name: _conftest