Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-05-04
07:16 • Closed ticket [2511424fff]: condition variable error in thread-21.16 plus 6 ... artifact: 6772adb338 user: ferrieux
06:21 • Ticket [2511424fff]: 5 changes artifact: a4e7257ec3 user: ferrieux
06:19 • Ticket [2511424fff]: 4 changes artifact: 9eafc8efbf user: ferrieux
06:19 • Add attachment thr2.patch to ticket [2511424fff] artifact: cfeccc270b user: ferrieux
2009-03-13
21:23 • Ticket [2511424fff] condition variable error in thread-21.16 status still Op... artifact: c7b179de4e user: dgp
2009-01-15
21:25 • New ticket [2511424fff]. artifact: 2fc35bda8c user: dgp

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: