On Wed, Jul 7, 2010 at 4:32 PM, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,
>
> Am 07.07.2010 um 23:11 schrieb Ryan Waters:
>
>>>                 (send a init-function)
>>>                 (send a f))
>>
>> It's not guaranteed the init-function will complete before f.
>
> I doubt that. Since only one action can be active at a time and the ordering 
> is preserved, init-function will be complete before f by definition: f is not 
> started until init-function is complete. (And btw: no other g can happen 
> between init-function and f, because the agent is not yet known to the 
> outside world)
>
> Sincerely
> Meikel
>

My apologies - I read the code wrong and should explain more of what I
see.  When the if is true, the ordering of init-function and f is
guaranteed so init-function will complete before f.  However, on any
subsequent calls to example, there are no language guarantees that
keep the if from evaluating to false, calling (send @my-ref f), but
only after the previous call to (send a init-function).

Stated another way, it's technically possible the agent calls won't
complete before a subsequent call to example.

-- 
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