Skip to content

Commit 82965fa

Browse files
author
Andrew J Westlake
committed
added function to get the python event loop
1 parent 01b247e commit 82965fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ pub fn try_init(py: Python) -> PyResult<()> {
5656
Ok(())
5757
}
5858

59+
pub fn get_event_loop() -> PyObject {
60+
EVENT_LOOP.get().unwrap().clone()
61+
}
62+
5963
/// Run the event loop forever
6064
///
6165
/// This function must be called on the main thread

0 commit comments

Comments
 (0)