From: SourceForge.net <no...@so...> - 2011-02-14 20:46:56
|
Bugs item #3175754, was opened at 2011-02-08 08:34 Message generated for change (Settings changed) made by andreas_kupries You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3175754&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 27. Channel Types Group: current: 8.5.9 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Andreas Kupries (andreas_kupries) Summary: memchan fifo events Initial Comment: Using the Memchan fifo command, the read events are not being consistent, not triggered at all, triggered only after reading at least one character first. Example: % package req Memchan 2.3 % set c [fifo] fifo0 % chan event $c readable r % proc r {} {puts "read -- [read $::c]"} % puts $c "testing read" % flush $c % update % read $c 1 t % update read -- esting read ########################## It can also generate false positives: % package require Memchan 2.3 % set c [fifo] fifo0 % fileevent $c readable {puts stderr READ:; puts stderr "([read $::c 1])"} % update READ: () % update READ: () ############################# Even stranger, fileevents stop when data are ready ! % fconfigure $c -buffering line % puts $c aa % update % update % update % read $c 1 a % update READ: (a) READ: ( ) % update READ: () % update READ: () ######################## I tried it Tcl 8.5 and 8.6. Same issue on both. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2011-02-14 12:46 Message: Fixed. Indeed, an inverted condition dropping readable events when actually needed. Side note: This bug was found in Memchan, and should have been reported to the Memchan project @ SF, and not the Tcl core. It was fixed in Memchan too. I accepted the misfile this time because I would have been the person to fix it anyway, regardless of filing location. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3175754&group_id=10894 |