Functions and tools for dealing with all threads and threadpools necessary for nREPL operation.
Functions and tools for dealing with all threads and threadpools necessary for nREPL operation.
Executor used to run the handler loop and handle individual requests.
Executor used to run the handler loop and handle individual requests.
(interrupt-stop t)
This works as follows
Thread/sleep
.force-stop-delay-ms
(5000ms) for the thread
to cleanly terminate. Only calls .stop
if it fails to do so (and risk
state corruption)This set of behaviours strikes a balance between allowing a thread to respond to an interrupt, but also ensuring we actually kill runaway processes.
This works as follows 1. Calls interrupt 2. Wait 100ms. This is mainly to allow thread that respond quickly to interrupts to send a message back in response to the interrupt. Significantly, this includes an exception thrown by `Thread/sleep`. 3. Asynchronously: wait another `force-stop-delay-ms` (5000ms) for the thread to cleanly terminate. Only calls `.stop` if it fails to do so (and risk state corruption) This set of behaviours strikes a balance between allowing a thread to respond to an interrupt, but also ensuring we actually kill runaway processes.
Executor used to accept incoming connections.
Executor used to accept incoming connections.
(run-with executor & body)
Run the provided body
using executor
. Don't wait for the result (unless the
executor itself is blocking).
Run the provided `body` using `executor`. Don't wait for the result (unless the executor itself is blocking).
(thread-factory thread-name-fmt)
Return a thread factory that produces daemon threads with the name specified by
thread-name-fmt
.
Return a thread factory that produces daemon threads with the name specified by `thread-name-fmt`.
Executor used to kill session threads that did not respond to interrupt.
Executor used to kill session threads that did not respond to interrupt.
Executor used to run the transport run the handler loop and handle individual requests.
Executor used to run the transport run the handler loop and handle individual requests.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close