Repository navigation
Conversation
Add a Barrier object to asyncio synchronized primitives
Change after run make patchcheck
run make patchcheck
Add comment when testing self._state Change if to while instruction in _block method
Refactoring all test names of BarrierTests to be more readable Add a method cancel_coros Refactoring and simplifyiing some tests Correction of RGX_REPR
after run python.bat Tools\scripts\patchcheck.py
Add Barrier object as a clone of threading.Barrier
Describe when action is called
first feedbacks from Emmanuel Arias
Remove "import functools"
Suggestion of Emmanuel Arias: Add sample and description about Barrier Class
bpo-43352 - Add a sample and description for Barrier Object Minor updates as remove crlf
bpo-43352 Suppress ` in a comment of the example
…ythonGH-24903) Add a class BarrierTests to test Barrier object Run i17 tests ncluding one about Barrier does not accept loop parameter
…ythonGH-24903) Add the Barrier object in Synchronization section Add a link to a Barrier sample in Examples sub-section Add the BrokenBarrierError Exception in Exception section
…ythonGH-24903) Add a complete documentation inspired from threading.Barrier Add a sample to show how use a Barrier Object
…ythonGH-24903) Add a Barrier object as a clone from thraeding Barrier Update of __all__ variable to include this new class and the related BrokenBarrierError exception
…ythonGH-24903) Add a class BarrierTests to test Barrier object Run 17 tests including one about Barrier does not accept loop parameter
Contributor
Author
|
Sorry, Problems with old commits. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Currently, when the queue is full, all putting tasks are added to the
queue._puttersdeque, via a new future.As soon as an item is removed from this queue, one future of the deque is set to
done, and removed from the dequequeue._putters. This future moving from deque to queue, is in transit, not referenced anywhere.First, I suggest removing the future from
queue._puttersonly after it had been woken up, not before in order to keep in the deque all pending and moving tasks.Second, when
put()is called, if the queue is full or ifqueue._puttersis not empty , this item/task will be added toqueue._putters.When
put_nowait()is called, if the queue is full or ifqueue._puttersis not empty, we raise a newQueueueueFullWithPendingPutTasksexception derived fromQueueueueFull.The behavior of the
getpart should be identical.Modified methods of
Queueclass :New methods of
Queueclass:New exceptions of
queues.py: