Skip to content

Commit

Permalink
Remove outdated comment for sync_request recv acquire
Browse files Browse the repository at this point in the history
  • Loading branch information
comrumino committed Jul 2, 2022
1 parent c4f0616 commit b2d8ef0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rpyc/core/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,8 @@ def sync_request(self, handler, *args): # serving
:returns: the result of the request
"""
timeout = self._config["sync_request_timeout"]
# The recv rlock is acquired prior to invoking the request.
# AsyncResult will be constructed and it is possible GIL switches
# threads before AsyncResult.wait is invoked. So, using an rlock
# we acquire once here and once inside of wait which invokes serve
# threads before AsyncResult.wait is invoked.
value = self.async_request(handler, *args, timeout=timeout).value
return value

Expand Down

0 comments on commit b2d8ef0

Please sign in to comment.