You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Kotest in conjunction with BlockHound is usually fine. The following issue is an exception. Kotest uses ThreadPoolExecutor by default in FixedThreadCoroutineDispatcherFactory (via Executors.newSingleThreadExecutor().asCoroutineDispatcher()), which briefly blocks for thread queue management:
While BlockHound is a reactor project, it provides the same benefits with coroutines when used with the kotlinx-coroutines-debug module:
It reports blocking calls from threads that are part of the coroutine thread pool and currently execute a CPU-bound coroutine computation. It helps to detect thread-blocking early, e.g. when calling a blocking I/O library function. In a case like this, one can decide whether to
replace the call with a non-blocking one (using a coroutine-aware library), or
schedule the calling coroutine to run on a separate I/O thread, or
kotlinx-coroutines-debug supports a BlockHound integration. However, Kotest currently does not.
Using Kotest in conjunction with BlockHound is usually fine. The following issue is an exception. Kotest uses
ThreadPoolExecutor
by default inFixedThreadCoroutineDispatcherFactory
(viaExecutors.newSingleThreadExecutor().asCoroutineDispatcher()
), which briefly blocks for thread queue management:If that's OK, I could prepare a PR with a
BlockHound
integration solving the above issue.The text was updated successfully, but these errors were encountered: