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

Barrier hangs indefinitely when argparties < 0 or invalid type #121474

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@pygeek

Description

@pygeek

Bug report

Bug description:

threading.Barrier at no point checks for validparties.parties, of a negative value, or invalid type hang indefinitely on.wait(). This behavior is inconsistent from the behavior of any otherthreading primitives, which either conduct sanity checks on args during initialization, or fail at some point in their execution.

Steps to reproduce:

fromthreadingimportBarrier# negativebarrier=Barrier(-1)# <threading.Barrier at 0x10aa789b0: waiters=0/-1>barrier.wait()# invalid type stringbarrier=Barrier("test")# <threading.Barrier at 0x10ae64980: waiters=0/test>barrier.wait()# invalid type floatbarrier=Barrier(0.5)# <threading.Barrier at 0x10aa7a570: waiters=0/0.5>barrier.wait()# invalid type objectbarrier=Barrier(object())# <threading.Barrier at 0x10ae4f500: waiters=0/<object object at 0x10a878730>>barrier.wait()

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp