Overview
| Artifact ID: | d944efc37925f36d116cc975484a3038e941e87d |
|---|---|
| Ticket: | 1945538fffffffffffffffffffffffffffffffff
Stalling async reads with package TLS |
| User & Date: | ferrieux on 2011-11-11 20:44:25 |
Changes
- icomment:
Hm, it just occurred to me that "false positive" readable fileevents are unavoidable as soon as a the two following conditions hold: (a) the transmission unit is >=2 bytes (b) no read-ahead is done in the notifier As an example, the very same situation lets an utf-8-encoded channel generate the same false positives in vanilla Tcl. To solve it, since (a) is a given for both utf-8 and TLS, there are two options: (1) attack (b) by letting the notifier do a (nonblocking) 1-unit read-ahead (into the existing input buffer) when triggered by a low-level readable fileevent, and passing it to the upper layer only when the unit is complete. (2) decide that this is a Fact Of Life and warn all developers that a fileevent readable does *not* guarantee an immediate return of [read 1]. Look into the source of TLS where this assumption is made.
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"