[Bug 9880] New: noticed the comment about per-source mutexes for storage. If that's not desired, an approach that has worked well in other API designs is an application-selectable mutex per context. Thus, each localStorage object could have a "_mutex" property, which by

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9880

           Summary: noticed the comment about per-source mutexes for
                    storage.  If that's not desired, an approach that has
                    worked well in other API designs is an
                    application-selectable mutex per context. Thus, each
                    localStorage object could have a "_mutex" property,
                    which by
           Product: HTML WG
           Version: unspecified
          Platform: Other
               URL: http://www.whatwg.org/specs/web-apps/current-work/#man
                    ually-releasing-the-storage-mutex
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: contributor@whatwg.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html@w3.org


Section:
http://www.whatwg.org/specs/web-apps/current-work/#manually-releasing-the-storage-mutex

Comment:
 noticed the comment about per-source mutexes for storage.  If that's not
desired, an approach that has worked well in other API designs is an
application-selectable mutex per context. Thus, each localStorage object could
have a "_mutex" property, which by default is initialized to (for example) the
name of the remote serving host. If the application code assigns another
string to the _mutex property, that creates a new mutex shared by all contexts
that have that property value. If the application code assigns null to the
property, operations are not interlocked (and thus may race with any other
operation, even interlocked operations).  This probably still has some
implementation issues (it's probably additional complexity than the per-source
mutex), but it allows applications to decide whether they want performance or
safety, with the default being safety. 

Posted from: 208.80.119.3

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 8 June 2010 16:19:37 UTC