34556e97a90ed3416424fa8c506962b22b5dd806,lazyflow/request/request_rewrite.py,RequestLock,acquire,#RequestLock#Any#,663
Before Change
// Search for a "None" to pull off the list of pendingRequests.
// Don"t take real requests from the queue
r = self._pendingRequests.popleft()
while r is not None:
self._pendingRequests.append(r)
r = self._pendingRequests.popleft()
return got_it
else: // Running in a Request
with self._selfProtectLock:
After Change
:param blocking: Same as in threading.Lock
current_request = Request.current_request()
if current_request is None:
return self._acquire_from_within_thread(blocking)
else:
return self._acquire_from_within_request(current_request, blocking)
def _acquire_from_within_request(self, current_request, blocking):
with self._selfProtectLock:
// Try to get it immediately.
got_it = self._modelLock.acquire(False)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: ilastik/ilastik
Commit Name: 34556e97a90ed3416424fa8c506962b22b5dd806
Time: 2013-01-18
Author: bergs@janelia.hhmi.org
File Name: lazyflow/request/request_rewrite.py
Class Name: RequestLock
Method Name: acquire
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 481cf745158704e5173ff6e4a26808ebb04dfc14
Time: 2017-12-24
Author: max.lapan@gmail.com
File Name: ch11/01_a3c_data.py
Class Name:
Method Name: data_func
Project Name: pytorch/pytorch
Commit Name: 7ae7768617cba5863ecd14f1169fa75682897fbc
Time: 2021-02-24
Author: benjamin.lefaudeux@gmail.com
File Name: torch/distributed/optim/zero_redundancy_optimizer.py
Class Name: ZeroRedundancyOptimizer
Method Name: _broadcast_params
Project Name: streamlit/streamlit
Commit Name: 7a60bb5289b4ecb59a510f8ca666948c7f4c2e3d
Time: 2019-03-28
Author: thiagot@gmail.com
File Name: lib/streamlit/server.py
Class Name: Server
Method Name: loop_coroutine