Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-08-07
06:36 • Closed ticket [419683ffff]: TclpFinalizeCondition needs work on win plus 7 o... artifact: 4325e92474 user: hobbs
2001-05-18
07:37 • Ticket [419683ffff]: 4 changes artifact: beb47ad04a user: davygrvy
2001-04-28
10:14 • Ticket [419683ffff]: 5 changes artifact: 65da12fa9b user: davygrvy
10:00 • Ticket [419683ffff]: 4 changes artifact: 57668c3552 user: davygrvy
09:40 • Ticket [419683ffff]: 4 changes artifact: 3cb8dead64 user: davygrvy
09:40 • Ticket [419683ffff]: 4 changes artifact: d85f38232f user: davygrvy
09:40 • Add attachment patch.txt to ticket [419683ffff] artifact: 90fba6966b user: davygrvy
01:24 • New ticket [419683ffff] TclpFinalizeCondition needs work on win. artifact: 416cf0ee1f user: davygrvy

TclpFinalizeCondition needs work on win

Closed / Fixed419683ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 25 years ago
Descriptionplain2001-04-28 01:24:47
The thread extension calls Tcl_ConditionWait in 
ThreadCreate which creates a WinCondition structure 
and pre-inits it's usage.  After the condition 
variable is used, it's removed with 
Tcl_ConditionFinalize.

But Tcl_ConditionFinalize only ckfree's the structure, 
not the contents.  This leaves one undestroyed 
CriticalSection and maybe an event, too.  I'm not sure 
yet.

I'll post a follow-up about this.
davygrvyplain2001-04-28 09:40:00
Logged In: YES 
user_id=7549

This seems to fix it.  I can start and stop threads and the 
application handle count stays steady without growing.

In Tcl_CreateThread, I added a CloseHandle to decrement the 
reference count, so when the thread closes, the resources 
for that handle are reclaimed.

I also added a DeleteCriticalSection for the WinCondition 
structure removed by TclpFinalizeCondition.
davygrvyplain2001-04-28 09:40:01
File Added - 5803: patch.txt
davygrvyplain2001-04-28 10:00:16
Logged In: YES 
user_id=7549

This bug relates to 
https://sourceforge.net/tracker/index.php?
func=detail&aid=406058&group_id=10894&atid=110894 as well.
davygrvyplain2001-04-28 10:14:00
Logged In: YES 
user_id=7549

I'm happy with this patch.  Can I apply it to the core?
davygrvyplain2001-05-18 07:37:13
Logged In: YES 
user_id=7549

Jeff,

Should this get moved over to the patches list for approval?
hobbsplain2001-08-07 06:36:38
Logged In: YES 
user_id=72656

This passed all tests and makes sense, so I've applied it 
to 8.4a3 cvs.
Log in (anonymous is fine) to add a comment.

Attachments: