Message228745
I think that the main problem is that '_stop_server' is called from a main thread (by unittest machinery via addCleanup), whereas the loop is in the other thread. asyncio code is not thread-safe in general.
If I change your code slightly to avoid using addCleanup, then everything works: https://gist.github.com/1st1/8dd0a2d4aa1ffd895c52
FWIW I couldn't reproduce the "NoneType object is not iterable" error. On my machine with python3.4.1 it crashes with another error "AssertionError: server did not stop" on line 35. |
|
Date |
User |
Action |
Args |
2014-10-06 23:23:13 | yselivanov | set | recipients:
+ yselivanov, gvanrossum, vstinner, r.david.murray |
2014-10-06 23:23:13 | yselivanov | set | messageid: <1412637793.32.0.146825727905.issue22572@psf.upfronthosting.co.za> |
2014-10-06 23:23:13 | yselivanov | link | issue22572 messages |
2014-10-06 23:23:13 | yselivanov | create | |
|