Overview
| Artifact ID: | 5858e6350d097dbb1721fddedec60a0da0b0affa1c5cf33edab7295ebe848304 |
|---|---|
| Ticket: | ac7592e73c10d04b9bd0303308ac3db2396ad6e9
idle events are never processed when a "writable" handler on a nonblocking channel dominates the event queue |
| User & Date: | pooryorick on 2024-04-01 00:20:08 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
The following script derived from an example provided in [de232b49f26da1c1], never completes. <code><verbatim> namespace eval refchan { namespace ensemble create namespace export * proc finalize {chan args} { namespace delete c_$chan } proc initialize {chan args} { namespace eval c_$chan {} namespace upvar c_$chan watching watching set watching {} list finalize initialize seek watch write } proc watch {chan args} { namespace upvar c_$chan watching watching foreach arg $args { switch $arg { write { if {$arg ni $watching} { lappend watching $arg } after idle after 0 chan postevent $chan $arg } } } } proc write {chan args} { incr ::counter after idle after 0 chan postevent $chan write return 1 } } set f [chan create w [namespace which refchan]] chan configure $f -blocking 0 chan event $f writable [namespace code { puts $f X }] variable x {} apply [list {} { set script { set lambda [list ::apply [list script { variable count variable x if {[incr count] < 1000} { try $script } else { set x done } } [namespace current]] $script] after idle [list after 0 $lambda] } try $script } [namespace current]] set token [after 10000 [namespace code { set x timeout }]] vwait [namespace which -variable x] return $x </verbatim></code> This is because TclIO.c/ChannelTimerProc() keeps scheduling adding a an event to the front of the standard queue. - is_private changed to: "0"
- login: "pooryorick"
- priority changed to: "5 Medium"
- private_contact changed to: "2b2275eab1118e1fab0016cf1c5702893c6af86c"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "pooryorick"
- subsystem changed to: "- New Builtin Commands"
- title changed to: "idle events are never processed when"
- type changed to: "Bug"