Liking cljdoc? Tell your friends :D

mlib.thread


clear-loop-flagclj

(clear-loop-flag state')

joinclj

(join thread-state)

start-loopclj

(start-loop init step cleanup)

start loop in separate thread using state returned by init-fn, exit loop on empty new-state or on exception in step-fn or cleared loop-flag

init-fn: setup state' atom in context of the new thread step-fn: do work using state' atom cleanup-fn: get final state and optional exception, free resources bound to the state

 start loop in separate thread using state returned by init-fn,
exit loop on empty new-state or on exception in step-fn or cleared loop-flag

init-fn: setup state' atom in context of the new thread
step-fn: do work using state' atom
cleanup-fn: get final state and optional exception, free resources bound to the state
raw docstring

stop-loopclj

(stop-loop thread-state)

reset loop-flag and wait for the thread

reset loop-flag and wait for the thread
raw docstring

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

× close