note 74070 deleted from function.stream-set-blocking by danbrown

From: Date: Tue, 18 Aug 2009 23:26:06 +0000
Subject: note 74070 deleted from function.stream-set-blocking by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159619@lists.php.net to get a copy of this message
Note Submitter: ---- A concise description of Blocking vs. Non-blocking: http://tinyurl.com/ype2j7 http://www.franz.com/support/documentation/7.0/ doc/streams.htm#block-non-block-3 5.2.1 Blocking behavior in simple-streams There are three modes of blocking behavior when writing items in a sequence to a stream or filling a sequence with items read from a stream. The issue is what to do when (for writing) the entire sequence cannot be written and (for reading) the entire sequence cannot be filled, but no EOF is encountered. (By `the entire sequence', we mean that part specified by start and end if those are supplied.) Here are the modes and a description of what happens in that mode if the whole operation does not complete and no EOF is encountered. 1. Blocking mode: the system blocks (waits or hangs) until the operation can be completed. 2. Blocking/Non-Blocking (B/NB) mode: the system only blocks on the first element of the sequence: if it cannot be written or read, the system blocks. If the first element is successfully written or read, and a subsequent element cannot be written or read, the function doing the writing/reading returns, typically with the return value(s) indicating exactly what was accomplished. 3. Non-Blocking mode: the system never blocks. If an element cannot be written or read, the function doing the writing/reading returns, typically with the return value(s) indicating exactly what was accomplished.

« previous php.notes (#159619) next »