On Tue, Nov 24, 2009 at 6:01 AM, kony <kulakow...@gmail.com> wrote:

> Hi,
>
> I found that resolve does not work correctly (I guess) when it is
> called from other thread than main:
>
> e.g.
>
> let define
>
> (def zz 123)
>
> and afterwords call:
>
> (.start (new Thread #(println (resolve 'zz))))
>
> for me it does not work (it returns nil)
>

Seems to be an issue with *ns*:

sandbox=> *ns*
#<Namespace sandbox>
sandbox=> (.start (new Thread #(println *ns*)))
#<Namespace clojure.core>

It's a dynamic var and I guess clojure.core is the root binding. You'll have
to use (in-ns foo) or (binding [*ns* foo] ...) or something to really fix
it.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to