Permalink
Browse files

Minor

  • Loading branch information...
1 parent de79fc7 commit 2a456b454eff0d042ae0aa33bd5d62e7396b94af Mikael committed Mar 3, 2013
Showing with 11 additions and 4 deletions.
  1. +11 −4 lib/_io.scm
View
@@ -1809,13 +1809,20 @@
;; The thread will wait until the port's device is writeable in the
;; sense that more data can be written to it, or the port's timeout
;; is reached. The value #f is returned when the timeout is reached.
- ;; The value #t is returned when the port's device is writeable or the
- ;; thread was interrupted (for example with thread-interrupt!).
+ ;; The value #t is returned when the port's device is writeable or
+ ;; the thread was interrupted (for example with thread-interrupt!).
- ;; An example of when a port is not writeable is when a TCP client port
- ;; has full OS transmit buffers. For such a port, a
+ ;; An example of when a port is not writeable is when a TCP client
+ ;; port has full OS transmit buffers. For such a port, a
;; ##device-port-wait-for-output! on it will return when space has
;; become available in the buffers.
+ ;;
+ ;; Additionally, waiting for writability on a TCP client port is a way
+ ;; to ensure that the connection has been established at all in the
+ ;; first place. This may be of relevance to determine in some lowlevel
+ ;; use scenarios, as Gambit does TCP connect:s asynchronously in such
+ ;; a way that open-tcp-client returns the TCP client port object
+ ;; actually prior to the connection having been established.
(##declare (not interrupts-enabled))

0 comments on commit 2a456b4

Please sign in to comment.