std.concurrent.thread

all-stacktraces

added in 3.0

(all-stacktraces)

returns all available stacktraces

stacktrace

added in 3.0

(stacktrace)(stacktrace thread)

returns thread stacktrace

(stacktrace)

thread

added in 3.0

(thread {:keys [handler daemon priority classloader uncaught name start]})

creates a new thread

thread:active-count

added in 3.0

(thread:active-count)

returns active threads

thread:alive?

added in 3.0

(thread:alive? thread)

checks if thread is alive

thread:all

added in 3.0

(thread:all)

lists all threads

thread:all-ids

added in 3.0

(thread:all-ids)

lists all thread ids

thread:classloader

added in 3.0

(thread:classloader)(thread:classloader thread)(thread:classloader thread loader)

gets and sets the context classloader

thread:current

added in 3.0

(thread:current)

returns the current thread

thread:daemon?

added in 3.0

(thread:daemon?)(thread:daemon? thread)

checks if thread is a daemon

thread:dump

added in 3.0

(thread:dump)

dumps out current thread information

thread:global-uncaught

added in 3.0

(thread:global-uncaught)(thread:global-uncaught f)

gets and sets the global uncaught exception handler

thread:has-access?

added in 3.0

(thread:has-access? thread)

checks if thread allows access to current

thread:has-lock?

added in 3.0

(thread:has-lock? lock)

checks if thread has the lock

thread:id

added in 3.0

(thread:id)(thread:id thread)

returns the id of a thread

thread:interrupt

added in 3.0

(thread:interrupt thread)

interrupts a thread

thread:interrupted?

added in 3.0

(thread:interrupted? thread)

checks if thread has been interrupted

thread:join

added in 3.0

(thread:join)(thread:join thread)(thread:join thread millis)(thread:join thread millis nanos)

calls join on a thread

thread:notify

added in 3.0

(thread:notify lock)

notifies threads waiting on lock

thread:notify-all

added in 3.0

(thread:notify-all lock)

notifies all threads waiting on lock

thread:run

added in 3.0

(thread:run thread)

runs the thread function locally

thread:sleep

added in 3.0

(thread:sleep ms)

sleeps for n milliseconds

thread:spin

added in 3.0

(thread:spin)

waits using onSpin

thread:start

added in 3.0

(thread:start thread)

starts a thread

thread:uncaught

added in 3.0

(thread:uncaught)(thread:uncaught thread)(thread:uncaught thread f)

gets and sets the uncaught exception handler

thread:wait-on

added in 3.0

(thread:wait-on lock)

waits for a lock to notify

thread:yield

added in 3.0

(thread:yield)

calls yield on current thread