2011-11-28 Steve Huntley <stephen.huntley@alum.mit.edu>
authorSteve Huntley <stephen.huntley@alum.mit.edu>
Mon, 28 Nov 2011 19:48:12 +0000 (19:48 +0000)
committerSteve Huntley <stephen.huntley@alum.mit.edu>
Mon, 28 Nov 2011 19:48:12 +0000 (19:48 +0000)
* vfslib.tcl: Applied contributed patch for bug 3412801.  Clean up watch
timers for memchan vfs.

ChangeLog
library/vfslib.tcl

index 4522f18e55907b20c1a2c5fadc00caf11ec2b13e..243e90648374899995171c169594e8cbd75ee4c1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-28  Steve Huntley  <stephen.huntley@alum.mit.edu>
+
+       * vfslib.tcl: Applied contributed patch for bug 3412801.  Clean up watch
+       timers for memchan vfs.
+
 2011-11-28  Steve Huntley  <stephen.huntley@alum.mit.edu>
 
        * zipvfs.tcl: Applied contributed patch for bug 3395782.  Enables 
index 4d8e0304a3f346c62afbccb9591ce592fe07e9f8..2862148589fa616387609b488570bc40adba97ea 100644 (file)
@@ -62,6 +62,12 @@ if {[info command ::chan] ne {}} {
             }
             finalize {
                 unset buf pos name
+                foreach event {read write} {
+                    upvar #0 ::vfs::_memchan(watch,$event) watch
+                    if {[info exists watch] && ([set idx [lsearch -exact $watch $chan]] >= 0)} {
+                        set watch [lreplace $watch $idx $idx]
+                    }
+                }
             }
             seek {
                 foreach {offset base} $args break