Although a while loop does work here, it's just a hack to get the
desired behavior. Have you considered using a scheduled thread pool as
your controller?
For example:
(def ^{:private true} pool (atom nil))
(def ^{:private true} num-threads 3)
(defn- thread-pool []
(swap! pool (fn [p] (or p
Seems to work for me. Are you putting something valid in (do
something)?
Also if you want to watch files in a directory, there is JNotify,
which might be useful to you.
On Feb 21, 5:19 pm, clj123 wrote:
> Hello,
>
> I'm looking for an on-going service that runs and processes files in a
> certain
Hello,
I'm looking for an on-going service that runs and processes files in a
certain location. This function should be contiously running.
The function that I've used, it always running and when files are
place it does something with it.
(defn run-always []
(while true (dosomething)))
How