[issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads

2019-04-19 Thread Nick Davies
Nick Davies added the comment: > Would you prepare a patch for number 3? I will give it a try and see what I come up with. > I am afraid we can add another hard-to-debug multi-threaded problem by > complicating the data structure. Yeah this was my concern too, the adding and remo

[issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads

2019-04-17 Thread Nick Davies
Nick Davies added the comment: My preference would actually be number 3 because: 1: I agree that this isn't really a safe option because it could slow things down (possibly a lot) 2: I haven't found this to be rare in my situation but I am not sure how common my setup is. We have

[issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads

2019-04-16 Thread Nick Davies
Change by Nick Davies : -- type: -> behavior versions: +Python 3.6 ___ Python tracker <https://bugs.python.org/issue36607> ___ ___ Python-bugs-list mai

[issue36607] asyncio.all_tasks() crashes if asyncio is used in multiple threads

2019-04-11 Thread Nick Davies
New submission from Nick Davies : This problem was identified in https://bugs.python.org/issue34970 but I think the fix might have been incorrect. The theory in issue34970 was that GC was causing the weakrefset for `all_tasks` to change during iteration. However Weakset provides