bpo-30775: Clear potential ref cycle between Process and Process target#2470
bpo-30775: Clear potential ref cycle between Process and Process target#2470vstinner merged 2 commits into
Conversation
Besides Process.join() not being called, this was an indirect cause of bpo-30775. The threading module already does this.
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
Does it work if run() is called "late" after start()?
Maybe we clear clear the attributes in join() instead?
It's a open question, I don't understand how these things work :-)
Sorry, something went wrong.
run() is called in the child process, so it's safe to clear variables in the parent once the child is spawned (which happens in start()). I don't know what happens if people call run() themselves. They shouldn't :-) |
Sorry, something went wrong.
Oh ok. In this case, it makes sense and it's safe :-) |
Sorry, something went wrong.
|
Hum, how do you feel about backporting this change to other branches? IMHO it's a bug and it should be backported up to 2.7. |
Sorry, something went wrong.
|
Yes, that sounds reasonable. |
Sorry, something went wrong.
…ythonGH-2470) * Clear potential ref cycle between Process and Process target Besides Process.join() not being called, this was an indirect cause of bpo-30775. The threading module already does this. * Add issue reference. (cherry picked from commit 79d37ae)
…ythonGH-2470) * Clear potential ref cycle between Process and Process target Besides Process.join() not being called, this was an indirect cause of bpo-30775. The threading module already does this. * Add issue reference. (cherry picked from commit 79d37ae)
…ythonGH-2470) * Clear potential ref cycle between Process and Process target Besides Process.join() not being called, this was an indirect cause of bpo-30775. The threading module already does this. * Add issue reference. (cherry picked from commit 79d37ae)
Besides Process.join() not being called, this was an indirect cause of bpo-30775.
The threading module already does this.