W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2010

Re: File API: Blob and underlying file changes.

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 13 Jan 2010 02:38:39 -0800
Message-ID: <63df84f1001130238ufc3fbbblc45a89ddb389e544@mail.gmail.com>
To: Chris Prince <cprince@google.com>
Cc: arun@mozilla.com, Dmitry Titov <dimich@chromium.org>, Web Applications Working Group WG <public-webapps@w3.org>
On Tue, Jan 12, 2010 at 5:28 PM, Chris Prince <cprince@google.com> wrote:
>> For the record, I'd like to make the read "atomic", such that you can
>> never get half a file before a change, and half after. But it likely
>> depends on what OSs can enforce here.
> I think *enforcing* atomicity is difficult across all OSes.
> But implementations can get nearly the same effect by checking the
> file's last modification time at the start + end of the API call.  If
> it has changed, the read operation can throw an exception.

I'm talking about during the actual read. I.e. not related to the
lifetime of the File object, just related to the time between the
first 'progress' event, and the 'loadend' event. If the file changes
during this time there is no way to fake atomicity since the partial
file has already been returned.

/ Jonas
Received on Wednesday, 13 January 2010 10:39:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:04 UTC