Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix run_in_subprocess #299

Merged
merged 1 commit into from
Dec 26, 2024
Merged

Fix run_in_subprocess #299

merged 1 commit into from
Dec 26, 2024

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Dec 26, 2024

  1. The queue.Full exception is never raised, so expecting it does not make sense.
    An exception that can happen is pickle error, but it's safer to rather
    catch all exceptions.
  2. When child process puts a message, the parent process does not process what
    remains in the queue. This commit adds a drain mode.
  3. React to KeyboardInterrupt on the main process.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 26, 2024
@facebook-github-bot
Copy link
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. (Because this pull request was imported automatically, there will not be any future comments.)

1. The `queue.Full` exception is never raised, so expecting it does not make sense.
An exception that can happen is pickle error, but it's safer to rather
catch all exceptions.
2. When child process puts a message, the parent process does not process what
remains in the queue. This commit adds a drain mode.
3. React to KeyboardInterrupt on the main process.
@mthrok mthrok marked this pull request as ready for review December 26, 2024 21:30
@mthrok mthrok merged commit e1d3594 into main Dec 26, 2024
21 of 31 checks passed
@mthrok mthrok deleted the iterator2 branch December 26, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants