- From: Glenn Maynard <glenn@zewt.org>
- Date: Thu, 6 Jan 2011 16:33:06 -0500
- To: Jeremy Orlow <jorlow@chromium.org>
- Cc: Felix Halim <felix.halim@gmail.com>, public-webapps WG <public-webapps@w3.org>
> On Sat, Jan 1, 2011 at 4:22 AM, Felix Halim <felix.halim@gmail.com> wrote: >> >> I know this has been discussed > 1 year ago: >> >> http://www.mail-archive.com/whatwg@lists.whatwg.org/msg14087.html >> >> I couldn't find the follow up, so I guess localStorage is still >> inaccessible from Workers? I've been frustrated by the lack of access to localStorage in workers, too, and somewhat confused, since this seems like a basic API that people would expect to be able to access from workers. It seems like the underlying goal is to prevent localStorage from changing out from under a script while it's running. But, that's what currently happens with localStorage in most (all?) browsers. From reading other threads on this, it seems like nobody expects the localStorage mutex to ever be implemented in most browsers. Doesn't that indicate that it should be replaced with something that will eventually match reality? The main thing that would be nice to have, when async changes can happen, is a way to atomically set multiple properties: localStorage.update({field1: 1, field2: 2}); to prevent concurrent updates to multiple fields leaving localStorage in an unexpected state, and to prevent other threads reading localStorage from seeing partially-updated data. -- Glenn Maynard
Received on Thursday, 6 January 2011 21:34:30 UTC