[racket] Rosetta: Atomic updates task
Thanks Sam
Maybe someone ;-) can use 'box-cas!' to devise an optimistic locking
scheme; my approach was pessimistic. Go shows off multiple approaches.
Dan
On Sun, Jun 16, 2013 at 11:31 AM, Sam Tobin-Hochstadt <samth at ccs.neu.edu>wrote:
> You might find the 'box-cas!' procedure useful for this -- it performs an
> atomic update on a single box.
>
> Sam
> On Jun 15, 2013 9:16 PM, "Daniel Prager" <daniel.a.prager at gmail.com>
> wrote:
>
>> I've added my Racket solution to the Atomic Updates task. See
>>
>> http://rosettacode.org/wiki/Atomic_updates
>>
>> 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.
>>
>> -- Dan
>>
>> ____________________
>> Racket Users list:
>> http://lists.racket-lang.org/users
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130616/54ec4046/attachment.html>