note 74070 added to function.stream-set-blocking

From: Date: Thu, 22 Mar 2007 20:33:59 +0000
Subject: note 74070 added to function.stream-set-blocking
Groups: php.notes 
Request: Send a blank email to php-notes+get-124731@lists.php.net to get a copy of this message
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. ---- Server IP: 64.71.164.2 Probable Submitter: 208.41.229.162 ---- Manual Page -- http://www.php.net/manual/en/function.stream-set-blocking.php Edit -- https://master.php.net/note/edit/74070 Del: integrated -- https://master.php.net/note/delete/74070/integrated Del: useless -- https://master.php.net/note/delete/74070/useless Del: bad code -- https://master.php.net/note/delete/74070/bad+code Del: spam -- https://master.php.net/note/delete/74070/spam Del: non-english -- https://master.php.net/note/delete/74070/non-english Del: in docs -- https://master.php.net/note/delete/74070/in+docs Del: other reasons-- https://master.php.net/note/delete/74070 Reject -- https://master.php.net/note/reject/74070 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124731) next »