Hi,

Am 19.10.2009 um 06:39 schrieb Gorsal:

> So now that the future is working, I'm attempting to print from an
> actual java thread. Like this
>
> (defmacro with-thread [nm & body]
>  `(let [thread# (Thread. #(fn [] (do ~...@body)))]
>     ~@(if nm `((.setName thread# ~nm)))
>     (.start thread#)
>     thread#))
>
> (with-thread nil (println "HasdfasdfasdfasdfasdfasdfasdfasdfI"))
>
> Except no output! Eeek!!! What am i doing wrong?

Just a suspicion. (I don't know, what Repl you use.)

If the Repl sets up special *in* and *out* bindings, these will be  
different for the other thread. Eg. VimClojure does that. you try the  
following:

(let [out *out*]
   (with-thread nil
     (binding [*out* out]
       (println "muhahahahahaha"))))

Sincerely
Meikel

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

Reply via email to