Welcome! Please see the About page for a little more info on how this works.

+2 votes
in Refs, agents, atoms by

I was looking for documentation of volatile! etc., but I came up short.

There is some information in the Jira ticket https://clojure.atlassian.net/browse/CLJ-1512 (opening statement clarified by Fogus), and some additional flavor was contributed in the form of an unusually vivid question about the needs of stateful transducers in https://clojure.atlassian.net/browse/CLJ-2146.

Java also has something called "volatile", which is described (for example) at https://docs.oracle.com/javase/tutorial/essential/concurrency/atomic.html. But Clojure's docstrings do not refer to Java's concept, which they easily could do if it were similar.

Does Clojure have official documentation about volatile!?

1 Answer

0 votes
by

Clojure’s use does build on Java’s volatiles so the name is intentional.

The only other place I can think of where it’s documented is in the release notes https://github.com/clojure/clojure/blob/master/changes.md#21-transducers

It’s considered kind of an advanced tool so it’s intentionally not front and center. Could probably be mentioned in the transducer docs as an impl tool.

...