Skip to content

Commit

Permalink
Fix generator wrapper of concurrency guard (#995)
Browse files Browse the repository at this point in the history
  • Loading branch information
robsdedude authored Nov 28, 2023
1 parent 484bfdc commit 3d1dc5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/neo4j/_async/_debug/_concurrency_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ async def inner(*args, **kwargs):
if acquired:
try:
item = await iter_.__anext__()
except StopAsyncIteration:
return
finally:
async with self.__tracebacks_lock:
self.__tracebacks.pop()
Expand Down
2 changes: 2 additions & 0 deletions src/neo4j/_sync/_debug/_concurrency_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def inner(*args, **kwargs):
if acquired:
try:
item = iter_.__next__()
except StopIteration:
return
finally:
with self.__tracebacks_lock:
self.__tracebacks.pop()
Expand Down

0 comments on commit 3d1dc5b

Please sign in to comment.