damp.ekeko.util.jobs documentation

Utilities for launching and waiting for Eclipse Jobs.

as-synchronous-job

(as-synchronous-job label f)
Schedules a job and blocks until it is done.

make-eclipse-job

(make-eclipse-job label f)(make-eclipse-job label taskcomplete taskunitf)
2 args: Creates a job with given label that will, when run,
 apply f to the ProgressMonitor associated with the job.

3 args: Creates a job with given label that will, when run,
apply taskunitf taskcomplete times. Taskunitf is given the current 
index in [i, taskcomplete] applications.

promise-until-job-done

(promise-until-job-done value job)(promise-until-job-done value job user?)
Schedules a job to be run asynchronously and returns a promise until the job is done.

schedule-job

(schedule-job job)(schedule-job job user?)
Schedules the given job.

Examples:
(schedule-job (make-eclipse-job "Counting till 10000" 10000 (fn [i] (println (str i)))))