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

7.5.6 Thread Objects is too vague #40019

Closed
roysmith mannequin opened this issue Mar 9, 2004 · 3 comments
Closed

7.5.6 Thread Objects is too vague #40019

roysmith mannequin opened this issue Mar 9, 2004 · 3 comments
Labels
docs Documentation in the Doc dir

Comments

@roysmith
Copy link
Mannequin

roysmith mannequin commented Mar 9, 2004

BPO 912943
Nosy @birkenfeld

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 2005-07-17.21:01:05.000>
created_at = <Date 2004-03-09.19:16:45.000>
labels = ['docs']
title = '7.5.6 Thread Objects is too vague'
updated_at = <Date 2005-07-17.21:01:05.000>
user = 'https://bugs.python.org/roysmith'

bugs.python.org fields:

activity = <Date 2005-07-17.21:01:05.000>
actor = 'georg.brandl'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2004-03-09.19:16:45.000>
creator = 'roysmith'
dependencies = []
files = []
hgrepos = []
issue_num = 912943
keywords = []
message_count = 3.0
messages = ['20188', '20189', '20190']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'roysmith', 'alanvgreen']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue912943'
versions = []

@roysmith
Copy link
Mannequin Author

roysmith mannequin commented Mar 9, 2004

Some items which could be improved....

"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)."

This is a bit silly. Either these attributes are intended to be
exposed to users or they're not. If they are, they should be well
defined. If not, they shouldn't be mentioned at all.

"If the subclass overrides the constructor, it must make sure to
invoke the base class constructor (Thread.__init__()) before doing
anything else to the thread."

This is misleading. You need to call "Thread.__init__ (self)", i.e.
pass along the self argument. At least I think you do :-)

"join([timeout]) ... When the timeout argument is present and not
None, it should be a floating point number specifying a timeout for
the operation in seconds (or fractions thereof)."

What happens if you pass None? Does it wait forever? Is this any
different from not passing any argument at all? What happens if a
timeout occurs? Is there any way to differentiate between a
timeout and a normal return?

"A thread can be join()ed many times."

Presumably only if all but the last call timed out? Or maybe not?
If you get a normal return (i.e. not a timeout) from join(), and
then call join() again, what happens? Does it just return
immediately with no error?

@roysmith roysmith mannequin closed this as completed Mar 9, 2004
@roysmith roysmith mannequin added the docs Documentation in the Doc dir label Mar 9, 2004
@roysmith roysmith mannequin closed this as completed Mar 9, 2004
@roysmith roysmith mannequin added the docs Documentation in the Doc dir label Mar 9, 2004
@alanvgreen
Copy link
Mannequin

alanvgreen mannequin commented Jan 23, 2005

Logged In: YES
user_id=1174944

Submitted Patch 1107656 which addresses the 'alive' and
'active' issue. It does this by deprecating the isAlive()
method and adding an isActive method instead. The patch also
updates the documentation to talk about threads being
'active' rather than 'alive and active'.

@birkenfeld
Copy link
Member

Logged In: YES
user_id=1188172

The second item is no bug. Methods in the docs are always
written with a trailing "()".

I have addressed the join() issues in
Doc/lib/libthreading.tex r1.22, r1.20.4.2.

Closing as the remaining issue is covered by the patch
mentioned by alanvgreen.

@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
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

1 participant