<?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>23719</bug_id>
          
          <creation_ts>2013-11-05 07:47:48 +0000</creation_ts>
          <short_desc>Consider adding pull style flow control method to Stream</short_desc>
          <delta_ts>2014-01-28 05:26:11 +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>95791</commentid>
    <comment_count>0</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-11-05 07:47:48 +0000</bug_when>
    <thetext>It&apos;s good to have a method to allow &quot;passive producer&quot; (which doesn&apos;t want to do work until the connected consumer requests data) to wait until the consumer requests data.

E.g. random number generator would be categorized into this group.

Consider trade-off between advantage of this feature and inflation of API surface.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95842</commentid>
    <comment_count>1</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-11-06 06:27:47 +0000</bug_when>
    <thetext>There is a caveat we need to be careful of.

If we allow both
- Producer waiting for N bytes available for write
- Consumer waiting for M bytes available for read
this can result in deadlock.

Cf. bulk transfer, TCP&apos;s silly window syndrome issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95963</commentid>
    <comment_count>2</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-11-07 17:28:47 +0000</bug_when>
    <thetext>Split waiting functionality into a separate method waitForWritable(). It&apos;s confusing that write() method has that functionality. It doesn&apos;t seem to be worth taking that approach for smaller API surface.

For now, include just waitForWritable(undefined). waitForWritable(size) though it might be useful for some cases as explained in Comment 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95979</commentid>
    <comment_count>3</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2013-11-07 21:17:20 +0000</bug_when>
    <thetext>Done in preview ver https://dvcs.w3.org/hg/streams-api/raw-file/tip/preview.html

waitForWritable has been added.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99254</commentid>
    <comment_count>4</comment_count>
    <who name="Takeshi Yoshino">tyoshino</who>
    <bug_when>2014-01-28 05:26:11 +0000</bug_when>
    <thetext>It&apos;s in ED now. Named awaitSpaceAvailable().</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>