1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4 <TITLE>Blocking</TITLE> 5 <LINK REL="stylesheet" HREF="../../../../boost.css"> 6 <LINK REL="stylesheet" HREF="../theme/iostreams.css"> 7</HEAD> 8<BODY> 9 10<!-- Begin Banner --> 11 12 <H1 CLASS="title">Blocking</H1> 13 <HR CLASS="banner"> 14 15<!-- End Banner --> 16 17<H2>Description</H2> 18 19<P> 20 A <A HREF="device.html">Device</A> is Blocking if a <CODE>read</CODE> request never produces fewer characters than requested except at end-of-stream, and if a <CODE>write</CODE> request never consumes fewer characters than requested under any circumstances. All Devices currently provided with the Iostreams library are Blocking. Limited support for non-Blocking Devices has been provided as a foundation for future more comprehensive support of <A HREF='../guide/asynchronous.html'>asynchronous and non-blocking i/o</A>. 21</P> 22 23<P> 24 The Blocking concept does not apply to filters. Instead, filters are required to be <SPAN CLASS='term'>blocking-preserving</SPAN>, which means that 25</P> 26<UL> 27 <LI> 28 a <CODE>read</CODE> request never produces fewer characters than requested unless end-of-stream has been reached or unless a <CODE>read</CODE> request to a downsteam Source produces fewer characters than requested, and 29 </LI> 30 <LI> 31 a <CODE>write</CODE> request never consumes fewer characters than requested unless a <CODE>write</CODE> request to a downsteam Sink consumes fewer characters than requested. 32 </LI> 33</UL> 34 35<P> 36 Unlike other Iostreams library concepts, Blocking is not associated with any <A HREF='../guide/traits.html#category_tags'>category tag</A>. In the future, a <CODE>non_blocking_tag</CODE> may be introduced. 37</P> 38 39<H2>Refinement of</H2> 40 41<P><A HREF="device.html">Device</A>.</P> 42 43<A NAME="types"></A> 44<H2>Associated Types</H2> 45 46<P>Same as <A HREF="device.html">Device</A>.</P> 47 48<A NAME="expressions"></A> 49<H2>Valid Expressions / Semantics</H2> 50 51<P>Valid expressions are the same as <A HREF="device.html">Device</A>. The additional semantic requirements are described informally above.</P> 52 53<!-- Begin Footer --> 54 55<HR> 56 57<P CLASS="copyright">© Copyright 2008 <a href="http://www.coderage.com/" target="_top">CodeRage, LLC</a><br/>© Copyright 2004-2007 <a href="https://www.boost.org/users/people/jonathan_turkanis.html" target="_top">Jonathan Turkanis</a></P> 58<P CLASS="copyright"> 59 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <A HREF="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>) 60</P> 61 62<!-- End Footer --> 63 64</BODY>