Tcl Source Code

View Ticket
Login
Ticket UUID: 2511424
Title: condition variable error in thread-21.16
Type: Bug Version: None
Submitter: dgp Created on: 2009-01-15 21:25:32
Subsystem: 80. Thread Package Assigned To: vasiljevic
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2009-05-04 07:16:04
Resolution: Fixed Closed By: ferrieux
    Closed on: 2009-05-04 00:16:04
Description:
==== thread-21.16 thread::cond - delete waited variable FAILED
==== Contents of test case:

    ThreadReap
    set tid [thread::create]
    set emutex [thread::mutex create]
    set cond [thread::cond create]
    thread::send -async $tid [subst {
        thread::mutex lock $emutex
        thread::cond wait $cond $emutex 500
        thread::mutex unlock $emutex
    }]
    update
    after 10
    set c1 [catch {thread::cond destroy $cond} r1]
    thread::cond notify $cond
    after 1000
    set c2 [catch {thread::cond destroy $cond} r2]
    ThreadReap
    thread::mutex destroy $emutex
    list $c1 $c2 $r1 $r2

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: no such condition variable "cid30"
    while executing
"thread::cond notify $cond"
    ("uplevel" body line 14)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== thread-21.16 FAILED
User Comments: ferrieux added on 2009-05-04 07:16:04:
Committed after review by mistachkin (thanks Joe).

ferrieux added on 2009-05-04 06:21:17:
Attached patch fixes the issue by reordering things in RemoveCondv just like for RemoveMutex.

ferrieux added on 2009-05-04 06:19:28:

File Added - 325599: thr2.patch

dgp added on 2009-03-13 21:23:59:
Any chance someone can look into
these?  

I'd like to consider Thread for
bundling with Tcl 8.6, but failures
like this make me think it's not ready.

Attachments: