<div dir="ltr">Thanks Sam<div><br></div><div style>Maybe someone ;-) can use 'box-cas!' to devise an optimistic locking scheme; my approach was pessimistic. Go shows off multiple approaches.</div><div style><br></div>
<div style>Dan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 16, 2013 at 11:31 AM, Sam Tobin-Hochstadt <span dir="ltr"><<a href="mailto:samth@ccs.neu.edu" target="_blank">samth@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">You might find the 'box-cas!' procedure useful for this -- it performs an atomic update on a single box.</p>
<p dir="ltr">Sam</p>
<div class="gmail_quote"><div><div class="h5">On Jun 15, 2013 9:16 PM, "Daniel Prager" <<a href="mailto:daniel.a.prager@gmail.com" target="_blank">daniel.a.prager@gmail.com</a>> wrote:<br type="attribution">
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr">I've added my Racket solution to the Atomic Updates task. See<div><br></div><div> <a href="http://rosettacode.org/wiki/Atomic_updates" target="_blank">http://rosettacode.org/wiki/Atomic_updates</a><br>
</div><div><br>
</div><div>I'd be interested in suggestions on how to improve this solution, especially by drawing on existing facilities in Racket to construct a more elegant approach (or approaches) than the hand-rolled locks that I employed.</div>
<div><br></div><div>-- Dan</div></div>
<br></div></div>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div>
</blockquote></div><br></div>