1048ebcfee561aaa44c3ac4a1f9da058335794bc,src/python/pants/java/nailgun_executor.py,NailgunExecutor,_await_socket,#NailgunExecutor#Any#,204
Before Change
// TODO: share the decreasing timeout logic here with NailgunProtocol.iter_chunks() by adding
// a method to pants.util.contextutil!
remaining_time = time.time() - (start_time + timeout)
if remaining_time > 0:
stderr = read_file(self._ng_stderr, binary_mode=True)
raise self.InitialNailgunConnectTimedOut(
timeout=timeout,
stdout=accumulated_stdout,
stderr=stderr,
)
readable, _, _ = select.select([ng_stdout], [], [], (-1 * remaining_time))
if readable:
line = ng_stdout.readline() // TODO: address deadlock risk here.
try:
After Change
possibly_raise_timeout(remaining_time)
events = selector.select(timeout=-1 * remaining_time)
if events:
line = ng_stdout.readline() // TODO: address deadlock risk here.
try:
return self._NG_PORT_REGEX.match(line).group(1)
except AttributeError:
pass
accumulated_stdout += line
else:
with safe_open(self._ng_stdout, "r") as ng_stdout:
while 1:
remaining_time = calculate_remaining_time()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: pantsbuild/pants
Commit Name: 1048ebcfee561aaa44c3ac4a1f9da058335794bc
Time: 2019-06-13
Author: ericarellano@me.com
File Name: src/python/pants/java/nailgun_executor.py
Class Name: NailgunExecutor
Method Name: _await_socket
Project Name: geekcomputers/Python
Commit Name: 791e09b24641b6d372ba08c59b6b801440c767b2
Time: 2019-08-14
Author: 35282147+Hong199@users.noreply.github.com
File Name: fileinfo.py
Class Name:
Method Name:
Project Name: facebook/FAI-PEP
Commit Name: 9f67a534bce1063693d7716df11311e7584b6786
Time: 2018-12-11
Author: feisun@fb.com
File Name: libraries/python/classification_compare.py
Class Name: OutputCompare
Method Name: getData
Project Name: biolab/orange3
Commit Name: 8d4d199c35f5163ed21ae705a16ce3c8548d60c6
Time: 2012-11-28
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/data/io.py
Class Name: BasketReader
Method Name: prescan_file