You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Asynchronous.event_loop should get the existing event loop, if one exists. I one does not exist, it should create a new event loop then set the event loop by calling asyncio.set_event_loop so downstream consumers can get access to the same event loop when they call asyncio.get_event_loop.
@property
def event_loop(self):
if self._loop_ref is None:
self._loop_ref = asyncio.new_event_loop() <!-- never sets event loop
return self._loop_ref
The text was updated successfully, but these errors were encountered:
The event loop in robot will only be created if no running event loop is found in the first place. In the implementation of #5103 the event loop property will be basically reimplementing functionallity from is_loop_required.
Important to note as well that get_event_loop has a lot of complicated behaviour and can create event loops if none are found, which is also getting deprecated for 3.12 forward. For this, using get_running_loop() is preferred over get_event_loop().
If we have other event loops created in libraries for example, robot should not interfere with them, this ensure's that the resource is properly handled by the library. That said it is simpler for libraries to just implement functions as async and let robot do the rest, better for compatibility as well. Using get_running_loop() should return the correct loop for all purposes.
Asynchronous.event_loop should get the existing event loop, if one exists. I one does not exist, it should create a new event loop then set the event loop by calling
asyncio.set_event_loop
so downstream consumers can get access to the same event loop when they callasyncio.get_event_loop
.The text was updated successfully, but these errors were encountered: