W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: Proposal for fixing race conditions

From: Chris Rogers <crogers@google.com>
Date: Wed, 3 Jul 2013 17:14:51 -0700
Message-ID: <CA+EzO0k+0MXqqxamnobVU_LnPT5bC6a-wtzcm1Z2rs4uQAYsLA@mail.gmail.com>
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: Joseph Berkovitz <joe@noteflight.com>, "public-audio@w3.org" <public-audio@w3.org>
On Wed, Jul 3, 2013 at 4:15 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Thu, Jul 4, 2013 at 4:43 AM, Chris Rogers <crogers@google.com> wrote:
>> On Wed, Jul 3, 2013 at 4:12 AM, Joseph Berkovitz <joe@noteflight.com>wrote:
>>> FWIW, my reading was that Chris's last email agreed in principle that
>>> races needed to be eliminated and he said he wanted one more chance to go
>>> through the list of issues. The ball seems to be in his court.
>> Joe, I'm sorry if you misunderstood.  I *did* go through Robert's list
>> one more time and proposed my solution to the race problem.
> That's what I thought you were trying to do.
> However, your solution (adding "non-neuterable ArrayBuffers" to the Web
> platform) only addresses the neutering issue. It does nothing to prevent
> ArrayBuffer modifications from JS being visible to the audio thread in a
> racy manner.

For any practical and real-world use cases using the API, there aren't
really any problems any more than already exist today with raciness of
asynchronous callbacks/event-handlers.  We already live in a world where
XHR completions, setInterval/setTimeout, requestAnimationFrame, file/blob
async requests, receiving responses from web workers, events from
HTMLMediaElement, and many others can all occur in unpredictable orders and
at unpredictable times.  Even something like rendering the contents of a
video stream from <video> into a canvas and then reading the pixels back is
going to involve lots of raciness in terms of exactly what frame you're
reading at any given time.

We should discuss very specific real-world use cases because I think we're
in pretty good shape here.

> Rob
> --
> Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
> le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
> stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
> 'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
> waanndt  wyeonut  thoo mken.o w  *
> *
Received on Thursday, 4 July 2013 00:15:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:22 UTC