general_threading_rules.md: add information about disabling ProcessCanceledException for development purposes

This commit is contained in:
Karol Lewandowski 2022-08-05 16:50:37 +02:00
parent 5548b21ace
commit ce6472c3b7

View File

@ -69,6 +69,11 @@ The `checkCanceled()` should be called often enough to guarantee the process's s
PSI internals have a lot of `checkCanceled()` calls inside.
If a process does lengthy non-PSI activity, insert explicit `checkCanceled()` calls so that it happens frequently, e.g., on each _Nth_ loop iteration.
> Throwing `ProcessCanceledException` from `checkCanceled()` can be disabled for development (e.g. while debugging the code) with the <menupath>Tools | Internal Actions | Disable ProcessCanceledException</menupath> action.
> The action is available only if [Internal Mode is enabled](https://plugins.jetbrains.com/docs/intellij/enabling-internal.html).
>
{type="tip"}
## Read Action Cancellability
Background threads shouldn't take plain read actions for a long time.