Liking cljdoc? Tell your friends :D

long-thread.core


alive?clj

(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.
sourceraw docstring

createclj

(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:

keydescription
: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:

| key                 | description |
|---------------------|-------------|
| `: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.
sourceraw docstring

joinclj

(join thread)

Wait until a thread has stopped.

Wait until a thread has stopped.
sourceraw docstring

running-threadsclj

(running-threads)

Get a sequence of running Thread objects.

Get a sequence of running Thread objects.
sourceraw docstring

startclj

(start thread)

Start a thread.

Start a thread.
sourceraw docstring

stopclj

(stop thread)

Stop a thread and wait until it's interrupted.

Stop a thread and wait until it's interrupted.
sourceraw docstring

threads-by-nameclj

(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.
sourceraw docstring

until-interruptedcljmacro

(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.
sourceraw docstring

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

× close