STINNER Victor added the comment:
Le lundi 29 juin 2015, Yury Selivanov rep...@bugs.python.org a écrit :
You should develop using asyncio debug mode:
Maybe we should promote this check to the production mode?
asyncio must be slow. The check has a cost, I prefer to keep it only in
debug
New submission from Марк Коренберг:
Suppose that program:
import asyncio
import socket
def receiver(loop):
(a, b) = socket.socketpair()
loop.call_later(1, lambda: print('Should be called inside the loop'))
end = loop.time() + 3
STINNER Victor added the comment:
You should develop using asyncio debug mode:
https://docs.python.org/dev/library/asyncio-dev.html#asyncio-dev
haypo@selma$ PYTHONASYNCIODEBUG=1 ./python x.py
Starting busy receiver
Traceback (most recent call last):
File x.py, line 21, in module
main()
Марк Коренберг added the comment:
$ PYTHONASYNCIODEBUG=1 ./bug.py
Starting busy receiver
Busy receiver complete
Executing Task pending coro=receiver() running at ./bug.py:16
wait_for=Future pending cb=[Task._wakeup()] created at
/usr/lib/python3.4/asyncio/tasks.py:490
Марк Коренберг added the comment:
Adding of b.setblocking(0) after socketpair() does not help.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24532
___
Yury Selivanov added the comment:
You should develop using asyncio debug mode:
Maybe we should promote this check to the production mode?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24532