(alive? thread)
Returns true if the thread is alive, i.e. started and not yet stopped.
Returns true if the thread is alive, i.e. started and not yet stopped.
(create thread-name runnable)
(create thread-name runnable options)
Create a thread.
The thread is started immediately by default.
options
is a map with the following keys:
:daemon? -- If truthy, create a daemon thread. Default: false :start? -- If truthy, thread is started immediately. Default: true. :convey-bindings? -- If truthy, the bindings for dynamic variables are conveyed from the starting thread to the new thread. Default: true.
Create a thread. The thread is started immediately by default. `options` is a map with the following keys: :daemon? -- If truthy, create a daemon thread. Default: false :start? -- If truthy, thread is started immediately. Default: true. :convey-bindings? -- If truthy, the bindings for dynamic variables are conveyed from the starting thread to the new thread. Default: true.
(join thread)
Wait until a thread has stopped.
Wait until a thread has stopped.
(running-threads)
Get a sequence of running Thread objects.
Get a sequence of running Thread objects.
(stop thread)
Stop a thread and wait until it's interrupted.
Stop a thread and wait until it's interrupted.
(threads-by-name thread-name)
Get a sequence of Thread objects with the given name.
Thread names are not unique, so there might be more than one.
Get a sequence of Thread objects with the given name. Thread names are not unique, so there might be more than one.
(until-interrupted & body)
Run the body in an implicit do block until the thread is interrupted.
If you catch InterruptedExceptions in the body, this thread won't be stopped. If you want the thread to stop, re-throw the exception.
Run the body in an implicit do block until the thread is interrupted. If you catch InterruptedExceptions in the body, this thread won't be stopped. If you want the thread to stop, re-throw the exception.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close