Forwarding...

---------- Forwarded message ----------
From: Timothy Washington <twash...@gmail.com>
Date: Fri, Jan 3, 2014 at 1:17 PM
Subject: Re: Core.async, Rules for passing clojure vals to go block
To: Shaun Gilchrist <shaunxc...@gmail.com>


I'm using Prismatic's Schema in my code base. Now, it looks like defining
some functions with
s/defn<https://github.com/Prismatic/schema/blob/master/src/clj/schema/macros.clj#L453>,
yields some wonky behaviour. Particularly, not running, when being invoked
in a go block. It just fails silently, which is why it was so hard to track
down. Don't yet know why this is happening. But an fyi for the devs and
users of this package. Still love schema, I just need to figure out where
the call chain breaks down.


Hth

Tim Washington
Interruptsoftware.com <http://interruptsoftware.com>


On Fri, Jan 3, 2014 at 9:58 AM, Timothy Washington <twash...@gmail.com>wrote:

> Hey Shaun,
>
> Thanks for looking into this. Your example does indeed work. I'll have to
> teardown my own code and see where the invocations are failing. At least I
> know it's not core.async.
>
>
> Cheers
>
> Tim Washington
> Interruptsoftware.com <http://interruptsoftware.com>
>
>
> On Thu, Jan 2, 2014 at 4:16 PM, Shaun Gilchrist <shaunxc...@gmail.com>wrote:
>
>> Hey, I am attempting to duplicate the issue you described in the email
>> here: http://cljsfiddle.net/fiddle/shaunxcode.timothy-example and it
>> seems to work for me - granted I am doing this in cljs so maybe it is
>> different for clojure?
>>
>>
>> On Wed, Dec 25, 2013 at 7:35 AM, Timothy Washington 
>> <twash...@gmail.com>wrote:
>>
>>> Hi there,
>>>
>>> For core.async, what are the rules for, *i)* having vals from a
>>> function closure, *ii)* passed into a go block. In the example below, I
>>> cannot pass in the system-atom to the handle function. The call will just
>>> die silently, without throwing any exception. Instead, I have to pass in a
>>> nil for the function to be invoked.
>>>
>>> Is this expected behaviour? Is it a bug? I would've expected an
>>> exception to be thrown if that's forbidden.
>>>
>>>   (fn [system-atom handlefn]
>>>
>>>
>>>
>>>
>>>     (println "sanity check: " system-atom)
>>>
>>>     (go (loop [msg (<! chanl)]
>>>
>>>
>>>
>>>           ;; (handlefn system-atom msg)
>>>           (handlefn nil msg)
>>>
>>>
>>>
>>>           (recur (<! chanl)))))
>>>
>>>
>>> Thanks
>>>
>>> Tim Washington
>>> Interruptsoftware.com <http://interruptsoftware.com>
>>>
>>>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to