Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-96471: Add queue shutdown#96474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
EpicWink wants to merge14 commits intopython:mainfromEpicWink:queue-shutdown

Conversation

EpicWink
Copy link
Contributor

@EpicWinkEpicWink commentedSep 1, 2022
edited by bedevere-bot
Loading

@bedevere-bot
Copy link

Most changes to Pythonrequire a NEWS entry.

Please add it using theblurb_it web app or theblurb command-line tool.

@gvanrossum
Copy link
Member

Note that once this is ready for review we may need three separate reviewers -- one for asyncio, another for multiprocessing, a third for threading.

@bedevere-botbedevere-bot mentioned this pull requestJan 19, 2023
@arhadthedevarhadthedev added topic-asyncio stdlibPython modules in the Lib dir labelsFeb 9, 2023
@@ -113,6 +131,8 @@ async def put(self, item):
Put an item into the queue. If the queue is full, wait until a free
slot is available before adding item.
"""
if self.shutdown_state != _queue_alive:
Copy link
Contributor

@YvesDupYvesDupFeb 9, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

an example:

Suggested change
ifself.shutdown_state!=_queue_alive:
ifself.shutdown_stateisnot_QueueState.ALIVE:

@YvesDup
Copy link
Contributor

YvesDup commentedFeb 10, 2023
edited
Loading

  1. I have 6 more tests for fileLib/test/test_queue.py . How to proceed to send you all these lines ? Sorry for my question but I am not familiar with git commands :-(
  2. @EpicWink I do not see anyshutdown method in fileLib/multiprocessing/queues.py . Can you confirm please ? But There is aclose method.
    UPDATE:
    self._shutdown_state attr must be add to tuples of__setstate__ and__getstate__ in order to be included in serialization. Refers to lines 67 & 71 ofLib/multiprocessing/queues.py

@merwok
Copy link
Member

This should help:https://devguide.python.org/getting-started/git-boot-camp/

The basic commands you will need aregit add Lib/test/some/file to register changes in a file,git commit to save the registered changes with a note,git push to send the commits to your repository. The pull request will then be updated automatically.

@YvesDup
Copy link
Contributor

@merwok Thank for your feedback. I created my own branch fromEpicWink:queue-shutdown, and I am wondering how to give access to my changes. So may be@EpicWink can merge fromYvesDup:queue-shutdown ?

@merwok
Copy link
Member

Oh I missed that you weren’t the author of the PR!

Yes, you can make a pull request from your fork to epicwink’s work, or use the suggestion system here (comment on a line, find suggestion in the toolbar) to paste your new tests.

YvesDup and EpicWink reacted with thumbs up emoji

@YvesDup
Copy link
Contributor

I read again theoriginal topic and found nothing about what to do about the 'joined' tasks, threads (or processes). I just complete theshutdown method (only inasyncio andthreading) to release them. May be it is not a good option, or a sufficient option. Should we raise aShutDownexception for each of them ? Thoughts ?

@gvanrossum
Copy link
Member

@YvesDup What is your definition of a "'joined' task or thread"?

@YvesDup
Copy link
Contributor

YvesDup commentedFeb 13, 2023
edited
Loading

@gvanrossum: Task (or thread) that has called the.join() method ofQueue. It is blocked until(_)unfinished_task attribute ofQueue drops to 0. "blocked" task is more appropriate in that case.

EpicWinkand others added5 commitsFebruary 21, 2023 20:12
Co-authored-by: Duprat <yduprat@gmail.com>
Co-authored-by: Duprat <yduprat@gmail.com>
Co-authored-by: Duprat <yduprat@gmail.com>
@EpicWink
Copy link
ContributorAuthor

I'm reviewing@YvesDup 's changes inEpicWink#2

@YvesDup
Copy link
Contributor

I have just created a new PRgh-96471: Add queue shutdown, next step. to resume and continue working on this feature

@mementum

This comment was marked as off-topic.

Copy link
Contributor

@willingcwillingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@YvesDup Would you like to close this PR and split up#102499 into 3 PRs? Ideally breaking out asyncio into its own PR. Thanks!

@EpicWink
Copy link
ContributorAuthor

This has been superseded by#102499, then by#104225,#104228 and#104230

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@merwokmerwokmerwok left review comments

@willingcwillingcwillingc left review comments

@gvanrossumgvanrossumgvanrossum left review comments

@YvesDupYvesDupYvesDup left review comments

@gpsheadgpsheadAwaiting requested review from gpsheadgpshead will be requested when the pull request is marked ready for reviewgpshead is a code owner

@1st11st1Awaiting requested review from 1st11st1 will be requested when the pull request is marked ready for review1st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov will be requested when the pull request is marked ready for reviewasvetlov is a code owner

@kumaraditya303kumaraditya303Awaiting requested review from kumaraditya303kumaraditya303 will be requested when the pull request is marked ready for reviewkumaraditya303 is a code owner

Assignees
No one assigned
Labels
awaiting changesstdlibPython modules in the Lib dirtopic-asyncio
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

8 participants
@EpicWink@bedevere-bot@gvanrossum@YvesDup@merwok@mementum@willingc@arhadthedev

[8]ページ先頭

©2009-2025 Movatter.jp