Re: terminating an app that uses agents

2009-01-06 Thread Mark Volkmann
On Tue, Jan 6, 2009 at 11:07 AM, wubbie wrote: > > But after I shutdown the agent, > I created a new agent with the same name and also defined the > function. > So shutdown on earlier agent should not matter? I think he means that once you shut it down you can't use send or send-off for any agen

Re: terminating an app that uses agents

2009-01-06 Thread wubbie
But after I shutdown the agent, I created a new agent with the same name and also defined the function. So shutdown on earlier agent should not matter? -Sun On Jan 6, 11:46 am, Chouser wrote: > On Tue, Jan 6, 2009 at 11:18 AM, Mark Volkmann > > wrote: > > > On Tue, Jan 6, 2009 at 10:00 AM, wub

Re: terminating an app that uses agents

2009-01-06 Thread Chouser
On Tue, Jan 6, 2009 at 11:18 AM, Mark Volkmann wrote: > > On Tue, Jan 6, 2009 at 10:00 AM, wubbie wrote: >> user=> (shutdown-agents) >> nil > [snip] > >> user=> (send-off my-agent sleep-and-multiply 7 1500) >> java.util.concurrent.RejectedExecutionException (NO_SOURCE_FILE:0) > > I don't know wh

Re: terminating an app that uses agents

2009-01-06 Thread Mark Volkmann
On Tue, Jan 6, 2009 at 10:00 AM, wubbie wrote: > > Hi, > > I tried your example and some weird sequence generates > java.util.concurrent.RejectedExecutionException (NO_SOURCE_FILE:0) > > > Here is the scenario: > Clojure > user=> (def counter (agent 0)) > #'user/counter > user=> (send counter inc

Re: terminating an app that uses agents

2009-01-06 Thread wubbie
Hi, I tried your example and some weird sequence generates java.util.concurrent.RejectedExecutionException (NO_SOURCE_FILE:0) Here is the scenario: Clojure user=> (def counter (agent 0)) #'user/counter user=> (send counter inc) # user=> @counter 1 user=> (def my-agent (agent 1)) #'user/my-agent

Re: terminating an app that uses agents

2009-01-05 Thread Christian Vest Hansen
You need to remember to ... clojure.core/shutdown-agents ([]) Initiates a shutdown of the thread pools that back the agent system. Running actions will complete, but no new actions will be accepted nil On Tue, Jan 6, 2009 at 3:35 AM, Mark Volkmann wrote: > > Why doesn't the following cod