I suppose you could always just use plain old java threads and avoid
the thread-pool, or futures which have the advantage of being cancel-
able?


On Apr 21, 11:57 am, billh04 <h...@tulane.edu> wrote:
> In my application, I can open several windows. Each window is an
> independent unit and will send-off three agents to do background work.
> When I close a window, I stop the three threads from running, but the
> thread count never goes down when I display it by (println "Thread
> count is" (Thread/activeCount)).
>
> The thread count is always increasing. When I open a new window, the
> thread count goes up by 3 as expected. But, when I close that window
> and open another window, the thread count was not diminished by the
> closing. If I open seveal windows in a row and then close them and
> open one more window, the thread count does not go up. But, if I open
> several more windows and reach the max thread count that I was at
> before, the thread count starts to go up again and will never go below
> that count again.
>
> I think I read that the threads are being retained to be used again
> when needed. So, I am not surprised at this behaviour.
>
> But, to prevent this increasing retention of threads, is there some
> way to release the three threads that I started when the window
> opened? For example, it would be nice to have a function like
> (shutdown agent1 agent2 agent3).
--~--~---------~--~----~------------~-------~--~----~
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
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