Message265031
>> Update some places in asyncio where we currently use "get_event_loop()", such as Future constructor, Task.current_task, etc.
> Yury, do you have an idea how it could be done?
I think I do. To keep the backwards compatibility, we'll need to update the "get_event_loop()" function as follows:
def get_event_loop():
loop = _running_loop.loop
if loop is None:
loop = get_event_loop_old_impl()
return loop
No need to actually update Future or Task or any other asyncio code.
The get_running_loop() would look like this:
def get_running_loop():
loop = _running_loop.loop
if loop is None:
raise RuntimeError('no running event loop')
return loop |
|
Date |
User |
Action |
Args |
2016-05-06 21:00:56 | yselivanov | set | recipients:
+ yselivanov, gvanrossum, vstinner, r.david.murray, Ilya.Kulakov |
2016-05-06 21:00:56 | yselivanov | set | messageid: <1462568456.34.0.0993207365605.issue26969@psf.upfronthosting.co.za> |
2016-05-06 21:00:56 | yselivanov | link | issue26969 messages |
2016-05-06 21:00:56 | yselivanov | create | |
|