8000 Bugfix in generator_to_async_generator. · cool-RR/python-prompt-toolkit@e342c2e · GitHub
[go: up one dir, main page]

Skip to content

Commit e342c2e

Browse files
Bugfix in generator_to_async_generator.
1 parent 2683f30 commit e342c2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prompt_toolkit/eventloop/async_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def runner() -> None:
4848
break
4949

5050
finally:
51-
q.put_nowait(_done)
51+
loop.call_soon_threadsafe(q.put_nowait, _done)
5252

5353
# Start background thread.
5454
run_in_executor_with_context(runner)

0 commit comments

Comments
 (0)
0