s4hri / pykron

Other
0 stars 2 forks source link

new_event_loop fix to run tests #24

Closed adamlukomski closed 3 years ago

adamlukomski commented 3 years ago

Fixes tests - new_event_loop( ) instead of get_event_loop( ) allows for Pykron instance restarts. Also fixed returning values for wait_for_completed and future object.

ddetommaso commented 3 years ago

The issue comes from the way you are coding the tests. Pykron class is intended to be a singleton and the close method has to be called just once at the end of the main thread. Having new_event_loop is not a clean way to fix this issue.