cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-87063: Add is_closed method to multiprocessing.Process

Open rruuaanng opened this issue 1 year ago • 1 comments

  • Issue: gh-87063

for example:

import multiprocessing


def f():
    print('hello')
    print('world')

if __name__ == "__main__":
    p = multiprocessing.Process(target=f)
    p.start()
    p.join()

    # In a more context, it's closed
    p.close()
    
    # Currnet context
    # It's thrown a ValueError
    if p.exitcode == 0:
        pass

    # Changed
    if not p.is_closed():
        print(p.exitcode)

rruuaanng avatar Oct 22 '24 12:10 rruuaanng

It seems that this NEWS error can be ignored.

rruuaanng avatar Oct 22 '24 12:10 rruuaanng

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

bedevere-app[bot] avatar Oct 26 '24 07:10 bedevere-app[bot]

Sorry for my misunderstanding. I thought it was to change NEWS to what's NEWS, but it was actually to add to it. I'm sorry for that. I've made change :)

rruuaanng avatar Oct 26 '24 08:10 rruuaanng

Thanks to Bénédikt for taking responsibility for this PR. And, thanks to erlend for pointing out my mistake.👍

rruuaanng avatar Oct 26 '24 11:10 rruuaanng

I've made change. Thank for your review!

rruuaanng avatar Oct 27 '24 01:10 rruuaanng

@erlend-aasland Please review them again! :)

rruuaanng avatar Nov 08 '24 00:11 rruuaanng

@erlend-aasland Please review them again! :)

I asked some questions on the issue; IMO, they should be clarified before eventually landing this PR. In other words: I believe more discussion and perhaps a larger audience is needed.

erlend-aasland avatar Nov 08 '24 12:11 erlend-aasland

Happy New Year, everyone. It's been a long time since the last review. Do we still need to keep this open?

rruuaanng avatar Jan 10 '25 05:01 rruuaanng