No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A groovy library/dsl for using clojure's STM in groovy/grails applications.
this is just a thin layer of syntactic sugar on top of the java objects that implement the clojure language.
Not all concepts implemented here map exactly the their clojure namesakes.

Note, it is highly recommended that you understand how to use the objects in clojure first

This library is intended to be a vessel to sneak clojure.jar into your enterprise applications.
See Neal Ford's master plan for enterprise mindshare at

Once you get used to the joy of coding your concurrency using this model, silently switch your 
groovy scripts over to clj and enjoy the rest

See Dr. Venkat Subramaniam's materials from his "Taming Shared Mutability with STM" at for examples and concepts in using clojure STM from Java

Example usage:

import clojure.lang.Ref
import static groovystm.STM.doSync
import static groovystm.STM.alter

class MyStateClass {
    /** Make sure your Ref's wrap immutable objects - try out clojure.lang.PersistentHashMap for example */
    Ref balanceRef = new Ref(0)

    int deposit(int amt) {
        doSync {
            alter(balanceRef) { balance -> balance + amt }

    int currentBalance() {