2cf4c7253ce1fd01975fcf970e52434e44f6d71f,python/ray/util/client/worker.py,Worker,get,#Worker#Any#,161
Before Change
"list of IDs or just an ID: %s" % type(vals))
if timeout is None:
timeout = 0
out = [self._get(x, timeout) for x in to_get]
if single:
out = out[0]
return out
After Change
else:
deadline = time.monotonic() + timeout
out = []
for obj_ref in to_get:
res = None
// Implement non-blocking get with a short-polling loop. This allows
// cancellation of gets via Ctrl-C, since we never block for long.
while True:
try:
if deadline:
op_timeout = min(
MAX_BLOCKING_OPERATION_TIME_S,
max(deadline - time.monotonic(), 0.001))
else:
op_timeout = MAX_BLOCKING_OPERATION_TIME_S
res = self._get(obj_ref, op_timeout)
break
except GetTimeoutError:
if deadline and time.monotonic() > deadline:
raise
logger.debug("Internal retry for get {}".format(obj_ref))
out.append(res)
if single:
out = out[0]
return out
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances
Project Name: ray-project/ray
Commit Name: 2cf4c7253ce1fd01975fcf970e52434e44f6d71f
Time: 2021-03-04
Author: ekhliang@gmail.com
File Name: python/ray/util/client/worker.py
Class Name: Worker
Method Name: get
Project Name: pyprob/pyprob
Commit Name: a0f0369df8c3a8dc9b9a0687f1b73a7fd9aa5ab3
Time: 2018-12-04
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/nn/dataset.py
Class Name: DatasetOffline
Method Name: __init__
Project Name: nilmtk/nilmtk
Commit Name: 44672d4eba334ca97d32874d9aa03b02ce46d513
Time: 2014-12-10
Author: jack-list@xlk.org.uk
File Name: nilmtk/metergroup.py
Class Name: MeterGroup
Method Name: load