Skip to content

clojure.core/dosync

View this page on ClojureDocs

Type: macro Added: Clojure 1.0 Examples: 2 Runnable: 1
([& exprs])

Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction if none is already running on this thread. Any uncaught exception will abort the transaction and flow out of dosync. The exprs may be run more than once, but any effects on Refs will be atomic.

Examples

by devijvers on
by Dimagog on . May have evaluation errors.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.