Skip to content
Tcl Source Code View Ticket
Login

View Ticket

condition variable error in thread-21.16

Closed / Fixed2511424fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2009-01-15 21:25:32
==== 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
dgpplain2009-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.
ferrieuxplain2009-05-04 06:19:28
File Added - 325599: thr2.patch
ferrieuxplain2009-05-04 06:21:17
Attached patch fixes the issue by reordering things in RemoveCondv just like for RemoveMutex.
ferrieuxplain2009-05-04 07:16:04
Committed after review by mistachkin (thanks Joe).
Log in (anonymous is fine) to add a comment.

Attachments: