Liking cljdoc? Tell your friends :D

task.core


allocate-task-idclj

(allocate-task-id)

await-resultclj

(await-result task)

await-resultsclj

(await-results task)

await-taskclj

(await-task task)

build-task-functionclj

(build-task-function code)
(build-task-function {repeat :repeat
                      sleep-millis :sleep
                      accumulate :accumulate-results
                      repeat-value :repeat
                      while-clause :while
                      until-clause :until
                      :as options}
                     original-code)

Create the source code for the function to be called for each task execution. Code generation is done based on the provided options - you only pay for the options selected.

Create the source code for the function to be called for each task execution. 
Code generation is done based on the provided options - you only pay for the 
options selected.
raw docstring

clearclj

(clear)
(clear task)

Clears all currently runnig tasks

Clears all currently runnig tasks
raw docstring

complete?clj

(complete? task)

elapsed-time-secsclj

(elapsed-time-secs task)

get-taskclj

(get-task task-or-id)

Returns the current task associated with the given ID.

If called with an old task instance, returns the latest task for the same ID

Returns the current task associated with the given ID.

If called with an old task instance, returns the latest task for the same ID
raw docstring

last-task-counterclj


psclj

(ps &
    {:keys [filter fields tasks sort]
     :or {fields task-summary-fields
          filter (constantly true)
          sort :id
          tasks (vals (clojure.core/deref tasks))}})

Prints a table of tasks

Prints a table of tasks
raw docstring

resultclj

(result task)

runcljmacro

(run code)
(run options code)
(run code k1 v1 & more)

Create and run a new task.

Calls task with the relevant options.

Create and run a new task. 

Calls task with the relevant options.
raw docstring

run-taskclj

(run-task task)

running?clj

(running? task)

stopclj

(stop task)

stop-allclj

(stop-all)

stopped?clj

(stopped? task)

taskcljmacro

(task code)
(task options code)

Creates a task containing the given code. Valid options are: :repeat (Default) If left nil of false, the task will only execute once If a numeric value is used, the task will repeat the given number of times. If any other true value is used, the task will repeat infinitely.

:result An initial result value for the task. :result will be set to the value produced by the task on each iteration.

:accumulate-results If set to true, all results will be saved in the vector :results in the task.

:timeout A number of milliseconds to run the task for. If the timeout is reached during execution of the task, it will be allowed to complete.

:sleep A number of milliseconds to sleep between successive executions of the task

:while Code that will be called before each iteration with the task as an argument. If it returns true, then the task will complete.

:until Code that will be evaluated after each iteration with the task as an argument. If it returns true then the task will complete.

Creates a task containing the given code. Valid options are:
:repeat 
   (Default) If left nil of false, the task will only execute once
   If a numeric value is used, the task will repeat the given number of times. 
   If any other true value is used, the task will repeat infinitely.

:result
   An initial result value for the task. :result will be set to the value produced
   by the task on each iteration.

:accumulate-results
   If set to true, all results will be saved in the vector :results in the task.

:timeout
   A number of milliseconds to run the task for. If the timeout is reached during
   execution of the task, it will be allowed to complete.

:sleep
   A number of milliseconds to sleep between successive executions of the task

:while
   Code that will be called before each iteration with the task as an argument. 
   If it returns true, then the task will complete.

:until
   Code that will be evaluated after each iteration with the task as an argument. 
   If it returns true then the task will complete.
   
raw docstring

task*clj

(task* options function)

Creates a task data structure representing the specified function as a task

Creates a task data structure representing the specified function as a task
raw docstring

task-fieldsclj


task-loopclj

(task-loop task)

task-summaryclj

(task-summary task & {:keys [fields] :or {fields task-summary-fields}})

task-summary-fieldsclj


tasksclj


wrap-ifcljmacro

(wrap-if condition form)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close