Re: File API: Blob and underlying file changes.

On Tue, Jan 12, 2010 at 5:28 PM, Chris Prince <> 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