summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index d356e11..7d94037 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -2777,11 +2777,18 @@ FlushChannel(
ResetFlag(statePtr, BG_FLUSH_SCHEDULED);
ChanWatch(chanPtr, statePtr->interestMask);
} else {
- /* TODO: If code reaches this point, it means a writable
- * event is being handled on the channel, but the channel
- * could not in fact be written to. This ought not happen,
- * but Unix pipes appear to act this way (see io-53.4).
- * Also can imagine broken reflected channels. */
+
+ /*
+ * When we are calledFromAsyncFlush, that means a writable
+ * state on the channel triggered the call, so we should be
+ * able to write something. Either we did write something
+ * and wroteSome should be set, or there was nothing left to
+ * write in this call, and we've completed the BG flush.
+ * These are the two cases above. If we get here, that means
+ * there is some kind failure in the writable event machinery.
+ */
+
+ assert(!calledFromAsyncFlush);
}
}