- From: ATSUSHI TAKAYAMA <taka.atsushi@googlemail.com>
- Date: Thu, 27 Oct 2011 12:42:46 -0400
- To: Glenn Maynard <glenn@zewt.org>
- Cc: Webapps WG <public-webapps@w3.org>
I see. Thanks Glenn. A. TAKAYAMA On Thu, Oct 27, 2011 at 12:30 PM, Glenn Maynard <glenn@zewt.org> wrote: > On Thu, Oct 27, 2011 at 11:51 AM, ATSUSHI TAKAYAMA > <taka.atsushi@googlemail.com> wrote: >> >> So converting Blob to ArrayBuffer is only supported through an >> asynchronous API (FileReader's readAsArrayBuffer) except in Workers, >> but the other way round is synchronous? I thought the direction of the >> client side web was to make all API's that might involve disk access >> asynchronous. > > Creating a Blob can be synchronous because it doesn't actually (visibly) > copy or move any data around--that doesn't happen until you actually try to > do something with the data, and all APIs to do *that* are async. > > Even if an implementation needs to hit the disk to make a Blob out of an > ArrayBuffer for some reason, it doesn't have to wait for that to complete > before returning the Blob. It can just return the Blob and complete the > copy asynchronously, since it already knows everything it needs to about the > Blob (its size) in order to return it. > > -- > Glenn Maynard > >
Received on Thursday, 27 October 2011 16:43:35 UTC