Overview
| Artifact ID: | 50ec4a0619e86b8e4760453e77a47d429438d9a4 |
|---|---|
| Ticket: | 894da183c8475264b8070b5b4dbbd6dd72f8dd69
In a thread, switch a non-blocking channel to blocking and close == hang |
| User & Date: | pooryorick on 2015-04-24 18:37:17 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
The following script causes Tcl to hang: <code><verbatim> #! /bin/env tclsh package require Thread lassign [chan pipe] pr pw # Comment this out and the interpreter no-longer hangs. chan configure $pw -blocking 0 set tid [thread::create] thread::transfer $tid $pw thread::send $tid [list variable pw $pw] thread::send $tid [list lappend notify_condition $pw] thread::send -async $tid { #after 5000 apply {{} { variable notify_condition variable pw for {set i 0} {$i < 10000} {incr i} { puts $pw [string repeat [info cmdcount] 15] } foreach chan $notify_condition { chan configure $chan -blocking 1 close $chan } }} thread::release } after 5000 set data [read $pr] close $pr puts {condition occured} </verbatim></code> - foundin changed to: "8.6.4"
- is_private changed to: "0"
- login: "pooryorick"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "pooryorick"
- subsystem changed to: "25. Channel System"
- title changed to:
In a thread, switch a non-blocking channel to blocking and close == hang
- type changed to: "Bug"