Re: question regarding agents

2009-09-23 Thread Roger Gilliar
Thanks for the answer. > Wrapping a mutable thing like an output stream in an agent seems > dubious to me. It was intended to use an agent here since I need to control the access to the write object. But what I forgot was ' the validator succeeds or if no validator was given, the return va

Re: question regarding agents

2009-09-23 Thread John Harrop
On Wed, Sep 23, 2009 at 4:18 PM, Roger Gilliar wrote: > I have the following code: > > (defn handle-client [in out] >(binding [ >*in* (reader in) >] >(with-connection db >(let [outstream (agent (writer out))] >

question regarding agents

2009-09-23 Thread Roger Gilliar
I have the following code: (defn handle-client [in out] (binding [ *in* (reader in) ] (with-connection db (let [outstream (agent (writer out))] (loop []