On Wed Mar  2 15:44 2011, clj123123 wrote:
> In a multi thread app, is there a way to mark a function to be
> blocking so it can run not simultaneously but would be blocking for
> each thread?

You could try the locking macro.  For this you need an object to lock
on.  I suppose you could lock on the function itself:

(defn my-fn []
  (locking my-fn
    (do cool stuff)))

Sincerely,

Daniel Solano Gómez

Attachment: pgpX7xFd4OsLC.pgp
Description: PGP signature

Reply via email to