Skip to content
Tcl Source Code View Ticket
Login

View Ticket

thread::exit flaws

Closed / Fixed3407860fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 41 days ago
Descriptionplain2011-09-11 20:50:07
Perhaps there's no value fixing a command that's
marked deprecated, but...

[thread::exit] is documented to take no arguments,
but that's not checked.  Any number of arguments
are accepted and ignored without error.

It would seem to be more valuable, both in utility
and in parallel behavior with [::exit] for the command
[thread::exit] to accept one optional argument, an
integer "exit code" for the thread.

Without such an argument [thread::exit] always
declares the thread exit code to be 666, and
[thread::join] returns that value as documented,
when it is used.  But what value is that?  Returning
a value that never changes?
mistachkinplain2011-11-21 14:19:37
After careful review of the thread package code, I agree that this command should be changed in the way described by dgp.
serhiy.storchakawiki2026-10-21 09:59:44

Fixed in Thread 2.8.0 by 0839286864: thread::exit now accepts an optional exit status (default 666), which thread::join returns, and rejects extra arguments.

serhiy.storchaka Ticket [3407860fff]: 3 changes [History diff]2026-10-22 17:19:29
Log in (anonymous is fine) to add a comment.