Closed alcarney closed 1 year ago
Before this commit pygls would override the event loop for the current thread even when given an existing loop to use.
pygls
Now pygls will rely on asyncio.new_event_loop to create the appropriate event loop for the platform and only call it when loop=None
asyncio.new_event_loop
loop=None
This commit also introduces the _own_loop flag which is used to make sure pygls does not close an event loop it does not own.
_own_loop
Related: #334
Description (e.g. "Related to ...", etc.)
Before this commit
pygls
would override the event loop for the current thread even when given an existing loop to use.Now
pygls
will rely onasyncio.new_event_loop
to create the appropriate event loop for the platform and only call it whenloop=None
This commit also introduces the
_own_loop
flag which is used to make surepygls
does not close an event loop it does not own.Related: #334
Code review checklist (for code reviewer to complete)