ClojureDocs

导航

命名空间

sync

clojure.core

自 1.0 起可用 (源代码)
  • (sync flags-ignored-for-now & body)
transaction-flags => TBD, pass nil for now
 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 sync. The exprs may be run more than
once, but any effects on Refs will be atomic.