Skip to content

Commit d8e4dc4

Browse files
committed
Mention system property in docs that enable blocked thread detection
1 parent d283484 commit d8e4dc4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/core/starvation-and-tuning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ This section contains a very much *not* comprehensive list of common root causes
8989

9090
The easiest and most obvious source of CPU starvation is when blocking tasks are being run on the compute thread pool. One example of this can be seen above, but usually it's a lot less straightforwardly obvious than that one, and tracking down what is or is not blocking in third party libraries (particularly those written for Java) can be challenging. Once the offending code is found, it is relatively easy to swap an `IO(...)` for `IO.blocking(...)` or `IO.interruptible(...)`.
9191

92-
If your application is an `IOApp` then the easiest way to find these offending expressions is to enable thread blocking detection like this:
92+
If your application is an `IOApp` then the easiest way to find these offending expressions is to enable thread blocking detection. You can do this via the system property `cats.effect.detectBlockedThreads=true`, or by overriding a method in your `IOApp`:
9393

9494
```scala
9595
object Example extends IOApp.Simple {

0 commit comments

Comments
 (0)