<i>Given that things have simmered down, it seems like it&#39;s time for a re-cap of the options.  I believe this includes all the options currently on the table (in broad strokes anyhow).  If I missed anything or grossly mischaracterized any idea, feel free to correct me.</i><div>
<br></div><div>0:  Do nothing.  As far as I can tell, no one thinks this is a valid option.</div><div>1:  Simply disallow localStorage in workers.  Possibly allow in shared/persistent workers, but give them their own private storage area.</div>
<div>2:  Explicit locking.  Possibly only required for workers.  Would require dead lock detection or for the spec to dictate locking precedence if another lock were introduced.</div><div>3:  Expose localStorage to workers as asynchronous calls.  Most similar to other concurrency solutions within workers.</div>
<div>4:  Have some yield/checkpoint/commit type call on localStorage that would release any implicit/invisible lock.  This could also be useful in conjunction with #3.</div><div><br></div><div><br></div><div><b>My opinion:</b></div>
<div>#1 would definitely work, but doesn&#39;t seem necessary.  #2 seems to go against the grain of how concurrency is implemented everywhere else in the spec.  In addition, it could open pandora&#39;s box in terms of locks being added in elsewhere and starting to cause some messy issues there.  #3 and #4 preserve the simplicity of localStorage for the simple/common case--which is important above else, in my opinion.</div>
<div><br></div><div><br></div><div><br><div class="gmail_quote">On Mon, Mar 23, 2009 at 2:48 PM, Robert O&#39;Callahan <span dir="ltr">&lt;<a href="mailto:robert@ocallahan.org">robert@ocallahan.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Tue, Mar 24, 2009 at 10:40 AM, Jeremy Orlow <span dir="ltr">&lt;<a href="mailto:jorlow@google.com" target="_blank">jorlow@google.com</a>&gt;</span> wrote:<br>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
I really like the idea of some generic yield, though I wonder if there&#39;s some reason it hasn&#39;t been added earlier.  People have been using the setTimeout(..., 0) trick for a while to get around slow script warnings (and general unresponsiveness)...so surely something like this must have come up before?  If so, what were the drawbacks?<div>

<div></div></div></blockquote></div><div><br>An obvious issue is that you can easily end up with arbitrarily deep nesting and stack overflows.<br><br></div></div><div><div></div><div class="h5">Rob<br>-- <br>&quot;He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all.&quot; [Isaiah 53:5-6]<br>


</div></div></blockquote></div><br></div>