Skip to content
Tcl Source Code View Ticket
Login

View Ticket

TclThread_Init called twice?

Closed / Fixed1055836fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-10-28 03:08:04
from Tcl_AppInit() of win/tclAppInit.c, Tcltest_Init is
called and from within that, it calls TclThread_Init
(line 710 of generic/tclTest.c), yet Tcl_AppInit calls
TclThread_Init a second time (line 164 of
win/tclAppInit.c).

How is right?  Should Tcl_AppInit be responsible or
Tcltest_Init for loading the thread package that is
part of the test suite?
davygrvyplain2004-10-28 10:20:55
File Added - 106783: patch.txt

Logged In: YES 
user_id=7549

Personally, I think the shell should not be responsible as
it is good refactoring.  See attached patch.
dgpplain2004-10-28 11:41:50
Logged In: YES 
user_id=80530

It's definitely wrong, though
harmless, to have it called
from both places.  Feel free
to make whatever temporary fix
you prefer.

The correct long term fix is
to destroy the phony, obsolete
"Thread 1.0" provided by 
TclThread_Init() completely,
and simply bundle the real,
[load]-able Thread package
with the core.
davygrvyplain2004-10-28 11:49:47
Logged In: YES 
user_id=7549

Ok, will do.  Tcl_AppInit calling TclThread_Init shall get
hosed.

I once thought the same about the thread package, but Jeff
wanted the test code to stay within the core itself.  I
don't know he feels lately about it.  A good goal, though.
davygrvy Closed ticket [1055836fff]. [History diff]2004-10-28 13:25:52
davygrvyplain2004-10-28 13:25:53
Logged In: YES 
user_id=7549

changes committed to HEAD.
Log in (anonymous is fine) to add a comment.

Attachments: