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

Add Thread.isActive() #41476

Closed
alanvgreen mannequin opened this issue Jan 23, 2005 · 3 comments
Closed

Add Thread.isActive() #41476

alanvgreen mannequin opened this issue Jan 23, 2005 · 3 comments
Labels
stdlib Python modules in the Lib dir

Comments

@alanvgreen
Copy link
Mannequin

alanvgreen mannequin commented Jan 23, 2005

BPO 1107656
Nosy @birkenfeld
Files
  • threading-alive-api.diff: patch to threading.py and libthreading.tex
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2007-03-15.21:40:16.000>
    created_at = <Date 2005-01-23.05:43:37.000>
    labels = ['library']
    title = 'Add Thread.isActive()'
    updated_at = <Date 2007-03-15.21:40:16.000>
    user = 'https://bugs.python.org/alanvgreen'

    bugs.python.org fields:

    activity = <Date 2007-03-15.21:40:16.000>
    actor = 'georg.brandl'
    assignee = 'none'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2005-01-23.05:43:37.000>
    creator = 'alanvgreen'
    dependencies = []
    files = ['6450']
    hgrepos = []
    issue_num = 1107656
    keywords = ['patch']
    message_count = 3.0
    messages = ['47596', '47597', '47598']
    nosy_count = 3.0
    nosy_names = ['georg.brandl', 'sonderblade', 'alanvgreen']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1107656'
    versions = []

    @alanvgreen
    Copy link
    Mannequin Author

    alanvgreen mannequin commented Jan 23, 2005

    The documentation for threading.Thread states:

    """Once the thread's activity is started, the thread is
    considered 'alive' and 'active' (these concepts are
    almost, but not quite exactly, the same; their
    definition is intentionally somewhat vague). It stops
    being alive and active when its run() method terminates

    • either normally, or by raising an unhandled exception."""

    This is confusing. There doesn't seem to be a need to
    expose both 'alive' and 'active' concepts in the API.

    The confusion was reported as part of bpo-912943
    "7.5.6 Thread Objects is too vague"

    This patch:

    • adds an isActive() method to Thread, that tests
      whether the thread is active.
    • adds documentation for isActive()
    • modifies the documentation for isAlive(), noting that
      it is deprecated and explaining why.

    @alanvgreen alanvgreen mannequin closed this as completed Jan 23, 2005
    @alanvgreen alanvgreen mannequin added the stdlib Python modules in the Lib dir label Jan 23, 2005
    @alanvgreen alanvgreen mannequin closed this as completed Jan 23, 2005
    @alanvgreen alanvgreen mannequin added the stdlib Python modules in the Lib dir label Jan 23, 2005
    @sonderblade
    Copy link
    Mannequin

    sonderblade mannequin commented May 9, 2005

    Logged In: YES
    user_id=51702

    I'm confused. Wouldn't it be better to just keep the
    isAlive() method instead of deprecating it and introducing
    isActive() in its place? In that way you only have to change
    the documentation and the API can remain intact.

    @birkenfeld
    Copy link
    Member

    Superseded by patch bpo-1680968.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant