Artifact
7b816de37d311e62e968ba048b6740b7eb6fa501:
Attachment "mychan.tcl" to
ticket [
2936225fff]
added by
ferrieux on
2010-03-06 08:37:40.
set fast [open /dev/zero r]
fconfigure $fast -translation binary
proc d {} {puts stderr MYCHAN:[info level -1]}
namespace eval mychan {
proc blocking {mychan mode} {d}
proc watch {mychan eventspec} {d}
proc readable {mychan} {d}
proc writable {mychan} {d}
proc read {mychan n} {d}
proc write {mychan data} {d;return -1;return [string length $data]}
proc initialize {mychan mode} {d;return [list initialize finalize blocking watch read write cget cgetall configure]}
proc configure {mychan option value} {d}
proc finalize {mychan} {d}
proc cget {mychan option} {d}
proc cgetall {mychan} {d}
namespace export *
namespace ensemble create
}
set ref [chan create write mychan]
fconfigure $ref -blocking 0
fcopy $fast $ref -command done
vwait forever