Skip to content

Commit

Permalink
Merge pull request #463 from achrafka/fix_AsyncResult
Browse files Browse the repository at this point in the history
fixing the problem with class AsyncResult when using self._is_ready.wait() in wait function
  • Loading branch information
comrumino authored Nov 9, 2021
2 parents 3a3be78 + 5feb06c commit 312644c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
"python.testing.nosetestsEnabled": false,
"python.testing.unittestEnabled": true,
"python.terminal.activateEnvironment": true,
"python.venvPath": "${workspaceFolder}\\.venv",
"python.pythonPath": "C:\\Users\\${env:USERNAME}\\AppData\\Local\\Programs\\Python\\Python37\\python.exe"
"python.venvPath": "${workspaceFolder}\\.venv"
}
4 changes: 1 addition & 3 deletions rpyc/core/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ def wait(self):
expiry set, and the result did not arrive within that timeout,
an :class:`AsyncResultTimeout` exception is raised"""
while not self._is_ready.is_set() and not self._ttl.expired():
if self._conn.serve(self._ttl):
# we received a response, wait for the completion call
self._is_ready.wait()
self._conn.serve(self._ttl)
if not self._is_ready.is_set():
raise AsyncResultTimeout("result expired")

Expand Down

0 comments on commit 312644c

Please sign in to comment.