<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23743</bug_id>
          
          <creation_ts>2013-11-06 17:47:39 +0000</creation_ts>
          <short_desc>Split the functionality to read exact N bytes into readExact() method</short_desc>
          <delta_ts>2013-12-05 19:32:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>Streams API</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Takeshi Yoshino">tyoshino</reporter>
          <assigned_to name="Takeshi Yoshino">tyoshino</assigned_to>
          <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>95875</commentid>
    <comment_count>0</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-11-06 17:47:39 +0000</bug_when>
    <thetext>The purpose of size argument of read() are
- allow user to get notified only when the specified size of data is available and get it as one non-fragmented ArrayBufferView
- flow control. I.e. not to tell the producer to generate, receive from wire, etc. too much

Current interface doesn&apos;t allow flow controlled consumption without specifying size N which means until N bytes become available, we don&apos;t get the result.

read() without argument helps for this case, but it&apos;s unclear how many bytes read() pulls. If we differentiate exact read and non-exact read mode, we can give read() clearer semantics
- read() in exact mode: Prohibit?
- read(N) in exact mode: I can accept up to N bytes. tell me when exactly N bytes are available
- read() in non-exact mode: tell me when any amount of data is available
- read(N) in non-exact mode: I can accept up to N bytes. tell me when any bytes are available</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95969</commentid>
    <comment_count>1</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-11-07 18:23:40 +0000</bug_when>
    <thetext>Instead of bothering readType, have a separate method named readExact.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95974</commentid>
    <comment_count>2</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-11-07 21:14:27 +0000</bug_when>
    <thetext>Done in preview ver https://dvcs.w3.org/hg/streams-api/raw-file/tip/preview.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96276</commentid>
    <comment_count>3</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-11-14 01:47:08 +0000</bug_when>
    <thetext>Looks like we lack say pipeExact() which is necessary for propagating pull requests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97207</commentid>
    <comment_count>4</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-12-05 19:32:19 +0000</bug_when>
    <thetext>read(N) in non-exact mode has been realized by pullAmount.

pipeExact() is unnecessary. Available space of the destination is propagated by pipe() by setting pipePullAmount to the value.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>