mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
threading_model.md: Improve the visibility of suspending read and write actions
This commit is contained in:
parent
23eaf29968
commit
ec211fd288
@ -199,6 +199,12 @@ Read and write actions allow executing a piece of code under a lock, automatical
|
||||
// read and return PsiFile
|
||||
}
|
||||
```
|
||||
|
||||
> Plugins implemented in Kotlin and targeting versions 2024.1+ should use suspending [`readAction()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/application/coroutines.kt).
|
||||
> See also [](coroutine_read_actions.topic).
|
||||
>
|
||||
{style="warning"}
|
||||
|
||||
</tab>
|
||||
<tab title="Java" group-key="java">
|
||||
|
||||
@ -242,8 +248,6 @@ Read and write actions allow executing a piece of code under a lock, automatical
|
||||
}
|
||||
```
|
||||
Note that this API is obsolete since 2024.1.
|
||||
Plugins implemented in Kotlin and targeting versions 2024.1+ should use suspending [`readAction()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/application/coroutines.kt).
|
||||
See also [](coroutine_read_actions.topic).
|
||||
|
||||
#### Rules
|
||||
{#read-actions-rules}
|
||||
@ -345,6 +349,11 @@ gantt
|
||||
// write data
|
||||
}
|
||||
```
|
||||
|
||||
> Plugins implemented in Kotlin and targeting versions 2024.1+ should use suspending [`writeAction()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/application/coroutines.kt).
|
||||
>
|
||||
{style="warning"}
|
||||
|
||||
</tab>
|
||||
<tab title="Java" group-key="java">
|
||||
|
||||
@ -387,7 +396,6 @@ gantt
|
||||
}
|
||||
```
|
||||
Note that this API is obsolete since 2024.1.
|
||||
Plugins implemented in Kotlin and targeting versions 2024.1+ should use suspending [`writeAction()`](%gh-ic%/platform/core-api/src/com/intellij/openapi/application/coroutines.kt).
|
||||
|
||||
#### Rules
|
||||
{#write-actions-rules}
|
||||
|
Loading…
x
Reference in New Issue
Block a user