|
2020-11-17
| ||
| 10:19 | Ticket [ac661a684d]: Tcl_NotifyChannel man page: "no writable callback on pending flush" missing check-in: d70e2ca1e9 user: oehhar tags: trunk, main | |
| 10:17 | Ticket [ac661a684d]: Tcl_NotifyChannel man page: "no writable callback on pending flush" missing check-in: 3a6c0f5d55 user: oehhar tags: core-8-branch | |
| 10:12 | • Closed ticket [ac661a684d]: Tcl_NotifyChannel man page: "no writable callba... artifact: bbf09016a5 user: oehhar | |
| 10:11 | Ticket [ac661a684d]: Tcl_NotifyChannel man page: "no writable callback on pending flush" missing check-in: b0f97d8082 user: oehhar tags: core-8-6-branch | |
|
2014-06-03
| ||
| 15:51 | • Ticket [ac661a684d] Tcl_NotifyChannel man page: "no writable callback on pe... artifact: df0b89d605 user: oehhar | |
|
2014-03-14
| ||
| 17:27 | • New ticket [ac661a684d]. artifact: 43f529f813 user: oehhar | |
Tcl_NotifyChannel man page: "no writable callback on pending flush" missing
Closed / Fixedac661a684d5abbdd0ef142176cfeb7a1a4f600b8Created 13 years agoUpdated 6 years ago
Descriptionwiki2014-03-14 17:27:26
The man-page of Tcl_NotifyChannel http://www.tcl.tk/man/tcl8.6/TclLib/CrtChannel.htm writes:
Tcl_NotifyChannel is called by a channel driver to indicate to the generic layer that the events specified by mask have occurred on the channel. Channel drivers are responsible for invoking this function whenever the channel handlers need to be called for the channel.
It suggests that a registered writable proc is called after this notification. This is not the case, if a flush is pending and no error occured for the channel. In this case, a flush is tried and no proc is called.
IMHO this fact should be noted on the man-page.
The following code brings a channel in the state, where a Tcl_NotifyChannel will not fire the fileevent:
set h [socket -async unreachable a] fileevent $h writable "puts Write;close $h" fconfigure $h -blocking 0 puts $h ABC flush $h # Now a flush is pending on the socket # When the cahnnel driver now calls Tcl_NotifyChannel, nothing happens the
On a second call to Tcl_NotifyChannel, the fileevent will fire, as the first flush falied and it is in error state.
Referenced by3
d70e2ca1e9Ticket [ac661a684d]: Tcl_NotifyChannel man page: "no writable callback on pending flush" missing check-in2020-11-17 10:19:483a6c0f5d55Ticket [ac661a684d]: Tcl_NotifyChannel man page: "no writable callback on pending flush" missing check-in2020-11-17 10:17:21b0f97d8082Ticket [ac661a684d]: Tcl_NotifyChannel man page: "no writable callback on pending flush" missing check-in2020-11-17 10:11:24
oehharwiki2014-06-03 15:51:20
Recent changes by DGP changed the behaviour like that:
If there is a flush pending, Tcl_NotifyChannel with writable flag set will invoke the flush. If the flush succeeds, the user function is not called.
oehharwiki2020-11-17 10:12:22
Added comment with checkin [b0f97d8082].
Log in (anonymous is fine) to add a comment.