I have a cursor that contains a map of two keys, :key1 and :key2. I would like 
to do the following:

1. Read the value of :key1
2. Use this value to derive a new value
3. Check if the new value meets some conditions
  * If yes, set the value of :key1 to the new value. Additionally, update 
another value held in :key2.
  * Otherwise, don't make any updates to :key1 or :key2

Whats the best way to do this kind of operation? Is it safe to deref the value 
of :key1 before calling transact!/update! or could this cause a concurrency 
bug? I'm sure how to do this all contained in a single transact! function.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to