This components maintains a thread pool which can be used to schedule activities.
This components maintains a thread pool which can be used to schedule activities.
(every {:keys [pool]}
ms-period
fun
&
{:keys [initial-delay desc] :or {initial-delay 0 desc ""}})
Calls fun every ms-period, and takes an optional initial-delay for the first call in ms. Returns a scheduled-fn which may be cancelled with cancel. All exceptions are catched and logged.
Default options are {:initial-delay 0 :desc ""}
Calls fun every ms-period, and takes an optional initial-delay for the first call in ms. Returns a scheduled-fn which may be cancelled with cancel. All exceptions are catched and logged. Default options are {:initial-delay 0 :desc ""}
(exception-to-log desc f)
(interspaced {:keys [pool]}
ms-period
fun
&
{:keys [initial-delay desc] :or {initial-delay 0 desc ""}})
Calls fun repeatedly with an interspacing of ms-period, i.e. the next call of fun will happen ms-period milliseconds after the completion of the previous call. Also takes an optional initial-delay for the first call in ms. Returns a scheduled-fn which may be cancelled with cancel. All exceptions are catched and logged.
Default options are {:initial-delay 0 :desc ""}
Calls fun repeatedly with an interspacing of ms-period, i.e. the next call of fun will happen ms-period milliseconds after the completion of the previous call. Also takes an optional initial-delay for the first call in ms. Returns a scheduled-fn which may be cancelled with cancel. All exceptions are catched and logged. Default options are {:initial-delay 0 :desc ""}
(new-scheduler)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close