Overview
| Artifact ID: | e1602389a06093e5da5c58ebca4c01163378108c723bad612c764c080851b2fd |
|---|---|
| Ticket: | de232b49f26da1c18e07513d4c7caa203cd27910
write-only nonblocking refchan and Tcl internal buffers |
| User & Date: | pooryorick on 2024-04-02 12:36:43 |
Changes
- icomment:
Adjusting the timer like that is one way to achieve rate control, but Ashok is arguing that rate control should be achieved by waiting for the device to signal that it's ready for more writes. The problem is that Tcl writes to a buffer without actually calling the <code>[write]</code> procedure that a refchan provides. The <code>[write]</code> procedure is the logical (and only) place for a refchan to signal that its ready for another write more, but because of this "write to a buffer instead of performing a write to the device" phenomenon, refchan must continuously signal that it's ready for a write, which means setting up a repeatedly-scheduled event. I think one thing we can all agree on is that if a device signals that its ready for a write, and Tcl writes to a buffer instead of actually performing a write, then Tcl can assume that the device is still ready for a write, and can safely generate a "writable" event again. We should be able to develop an improved approach based on this assumption, and the new approach will eliminate the need for refchans to set up such repeatedly-scheduled events, and probably also eliminate the need for that <code>CreateChannelScheduledEvent()<code> function that sebres just pointed to.
- login: "pooryorick"
- mimetype: "text/x-fossil-wiki"