On Apr 3, 2009, at 9:36 AM, BerlinBrown wrote:

Someone correct me if I go wrong here.  But, from my understanding,
every defined function in Clojure is an implementation of a thread?

The example you gave would all happen on one thread. Perhaps what you're thinking of is that every Clojure function implements the "Callable" and "Runnable" interfaces. This allows any Clojure function to be the "main" function of a new thread without any wrapping.

Here's an example from clojure.contrib.server-socket:

        (defn- on-thread [f]
          (doto (Thread. #^Runnable f)
            (.start)))

That runs the Clojure function f in a new thread.

--Steve

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to