diff options
| author | sostler <sbostler@gmail.com> | 2010-05-19 14:58:08 -0400 |
|---|---|---|
| committer | sostler <sbostler@gmail.com> | 2010-05-19 14:58:08 -0400 |
| commit | e3f32fc0ba82dd15a8f89f7c4965c68b39123e20 (patch) | |
| tree | 9579eadc4dd136c3d79ad54f6a7e990814965b8b /src/scheduled_agent.clj | |
| parent | bad5654f8e26bb5ace258096ca3dfbbdfe1da8cf (diff) | |
Basic rooms functionality
Diffstat (limited to 'src/scheduled_agent.clj')
| -rw-r--r-- | src/scheduled_agent.clj | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scheduled_agent.clj b/src/scheduled_agent.clj index b42bb57..b1d7fbf 100644 --- a/src/scheduled_agent.clj +++ b/src/scheduled_agent.clj @@ -12,8 +12,8 @@ data (ref init) pfunc (runnable-proxy (fn [] (try - (dosync - (ref-set data (func (ensure data)))) + (let [val (func)] + (dosync (ref-set data val))) (catch Exception e (print-stack-trace e 5))))) future (.scheduleWithFixedDelay pool pfunc 0 period TimeUnit/SECONDS)] |
