Re: async/close! called when channel is gc-ed ?

2014-01-26 Thread Cedric Greevey
(b) is easy if you're willing to drop down to Java, or use gen-class. You can define a finalize method. On the other hand, you might also want to look into WeakReference and ReferenceQueue, which can be used from Clojure with interop. You can discover when objects become eligible for GC with Refer

async/close! called when channel is gc-ed ?

2014-01-26 Thread t x
## Context: I'm doing some communication across cljs/clj with core.async ## Problem: I want a certain function called whenever: (a) the first time the channel is closed (b) when the channel is gc-ed (if not previously closed) (a) is rather easy: I define my own channel, wrapped around