Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Remove shared memory from MPFuture, fix minor bugs #317
Remove shared memory from MPFuture, fix minor bugs #317
Changes from 10 commits
4248a91
c2ce35c
a310f26
5321f7f
904c808
34e2d1d
0e38f5d
1849fe2
668698d
ba2d0cd
5d87238
7652a99
e5fc179
f5600c6
9b563bb
2dcd26d
bd852ef
d6a4048
f95a00a
d564efc
1667264
8a01bf1
1a4d7a8
ad34fdf
3ee5732
f147d18
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
self._aio_event.is_set()
is not guaranteed to be thread-safe. This check can probably be removed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decided to keep is_set for performance reasons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[It's thread-safe in the current implementation, and we've agreed that it's hard to imagine that it will stop being thread-safe.]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This loop never stops gracefully. Ideally, it would be cool to stop it via a
threading.Event
in the__del__
finalizer of the last active future in the current process.However, graceful shutdown may be out of scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: In Python 3.7, this may raise
RuntimeError
(instead ofInvalidStateError
) ifset_result
is called concurrently inside one process.This is a minor issue and we've agreed it won't be fixed.