> … if you want
> to create a report with a consistent view of the program's state in a
> certain point of time. What does that mean in Java? Do we need a
> "global lock" for that? But then, I have to use the same global lock
> on all writing operations, too? This results in destroying all
> concurrency.

Yes, exactly. This is the problem with a Java based version (at least
with one that uses the standard collections libraries). At the very
least your reporting function would have to make a complete copy of
the world state while holding the lock, it could then go in to process
this and produce the report on another thread after releasing the
lock.

This is why persistent data structures are so cool: you gain the
ability to look at consistent snapshots of the world for free.

Cheers,
Ian.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to