python / python/cpython

release() function for threading.Barrier

Open
#117,991 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type-feature
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

Proposal:

It would be nice if the Barrier object had a release() function that unconditionally unblocks all waiting threads, even if count hasn't reached the configured value. This is kind of like a reset()/abort() but without raising an exception or putting the Barrier in a broken state.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the threading.Barrier entry point and the existing reset() and abort() behavior. Done means an agreed release() API unblocks all waiting threads without raising an exception or leaving the Barrier broken, with tests covering that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.