portland-or

Clojure in PDX yo!
2015-11-06T15:50:00.000004Z

hello clojure-pdx!

2015-11-06T18:10:01.000010Z

Good morning, Knights that used to call themselves Clojerks!

bill 2015-11-06T23:36:54.000017Z

finishing up my last Ruby project…um…soon

2015-11-06T23:43:07.000018Z

@bill: How about some internal clojure lib therapy?

2015-11-06T23:43:34.000019Z

class Atom
    def initialize(value)
      @value = value
      @mutex = Mutex.new
    end

    def deref()
      @mutex.synchronize {
        @value
      }
    end

    def reset(value)
      @mutex.synchronize {
        @value = value
      }
    end
  end

1
2015-11-06T23:43:59.000020Z

you can implement swap the same way if you need it :simple_smile: