Example of how to run event_loop in separate thread for using the `timed_window()` method
See original GitHub issueHi,
Could you please add an example of how to run an event loop in a separate thread so that one can use the timed_window()
and delay()
methods?
The only reference I found is that it works in a Jupyter notebook because that already has an event loop running in the background. This doesn’t help me as I’m not running in a Jupyter notebook.
I’m using asyncio
in Python 3.6 and mostly that’s working fine but I can’t get the timed_window()
function to work.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Event Loop — Python 3.11.1 documentation
The event loop is the core of every asyncio application. Event loops run asynchronous tasks and callbacks, perform network IO operations, and run...
Read more >Threaded Asynchronous Magic and How to Wield It - Medium
Running a loop in a different thread new_event_loop() . The idea is to spawn a new thread, pass it that new loop and...
Read more >TkDocs Tutorial - Event Loop
Event Loop : Part of a Modern Tk Tutorial for Python, Tcl, Ruby, and Perl. ... running the GUI and event handlers in...
Read more >asyncio event loop in separate thread and consume queue ...
My approach is to kick off a separate thread and pass a queue to the event loop within that thread.
Read more >Python asyncio event loop in a separate thread - GitHub Gist
This gist shows how to run asyncio loop in a separate thread. It could be useful if you want to mix sync and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe @CJ-Wright or @jrmlhermitte has time here?
I don’t have a ton of experience with async programming, but I can try look at an example.