Liking cljdoc? Tell your friends :D
Clojure only.

long-thread.leak


checkingcljmacro

(checking & body)

Check for thread leaks.

The body is run in an implicit do block. When exiting the block, if there are threads running that weren't running when entering the block, an exception is thrown.

This is mainly useful for checking that thread-creating tests close their threads afterwards. Note that if you run thread-creating tests in parallel, you'll get false positives!

The exception is an ExceptionInfo with the following keys:

keydescription
:typealways has value :long-thread.leak/thread-leak
:leakedthe set of leaked Thread objects
Check for thread leaks.

The body is run in an implicit do block. When exiting the block, if there are
threads running that weren't running when entering the block, an exception is
thrown.

This is mainly useful for checking that thread-creating tests close their
threads afterwards. Note that if you run thread-creating tests in parallel,
you'll get false positives!

The exception is an ExceptionInfo with the following keys:

| key       | description |
|-----------|-------------|
| `:type`   | always has value :long-thread.leak/thread-leak
| `:leaked` | the set of leaked Thread objects
sourceraw docstring

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

× close