This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author richard.kiss
Recipients giampaolo.rodola, gvanrossum, pitrou, richard.kiss, vstinner, yselivanov
Date 2014-06-19.18:08:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403201287.24.0.814901553766.issue21163@psf.upfronthosting.co.za>
In-reply-to
Content
The more I use asyncio, the more I am convinced that the correct fix is to keep a strong reference to a pending task (perhaps in a set in the eventloop) until it starts.

Without realizing it, I implicitly made this assumption when I began working on my asyncio project (a bitcoin node) in Python 3.3. I think it may be a common assumption for users. Ask around. I can say that it made the transition to Python 3.4 very puzzling.

In several cases, I've needed to create a task where the side effects are important but the result is not. Sometimes this task is created in another task which may complete before its child task begins, which means there is no natural place to store a reference to this task. (Goofy workaround: wait for child to finish.)
History
Date User Action Args
2014-06-19 18:08:07richard.kisssetrecipients: + richard.kiss, gvanrossum, pitrou, vstinner, giampaolo.rodola, yselivanov
2014-06-19 18:08:07richard.kisssetmessageid: <1403201287.24.0.814901553766.issue21163@psf.upfronthosting.co.za>
2014-06-19 18:08:07richard.kisslinkissue21163 messages
2014-06-19 18:08:06richard.kisscreate