mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
Revert: information about no write intent lock on Dispatchers.EDT since 2024.3
This commit is contained in:
parent
4f714a5b48
commit
70f86e44fe
@ -67,14 +67,6 @@ In the IntelliJ Platform, the EDT dispatcher is also installed as `Dispatchers.M
|
||||
Use `Dispatchers.Main` only if the coroutine is IntelliJ Platform-context agnostic (e.g., when it can be executed outside the IntelliJ Platform context).
|
||||
Use `Dispatchers.EDT` when in doubt.
|
||||
|
||||
### EDT Dispatcher and Write Intent Lock
|
||||
|
||||
As explained in the [](threading_model.md#locks-and-edt) section, write intent lock is acquired on EDT implicitly.
|
||||
This behavior has changed in coroutine context in version 2024.3.
|
||||
|
||||
Since 2024.3, write intent lock is not acquired implicitly in coroutines called on the EDT dispatcher.
|
||||
Coroutines must use [`readAction`/`writeAction`/`writeIntentReadAction`](%gh-ic%/platform/core-api/src/com/intellij/openapi/application/coroutines.kt) API to acquire a required lock explicitly.
|
||||
|
||||
## Dispatchers vs. Threads
|
||||
|
||||
The dispatcher concept is a higher level of abstraction over threads.
|
||||
|
@ -130,11 +130,6 @@ Use other methods for pure UI operations.
|
||||
|
||||
</tabs>
|
||||
|
||||
> Since 2024.3, write intent lock is not acquired implicitly when code is run in coroutine context on the EDT dispatcher.
|
||||
> See [](coroutine_dispatchers.md#edt-dispatcher-and-write-intent-lock).
|
||||
>
|
||||
{style="warning"}
|
||||
|
||||
## Accessing Data
|
||||
|
||||
The IntelliJ Platform provides a simple API for accessing data under read or write locks in a form of read and write actions.
|
||||
|
Loading…
x
Reference in New Issue
Block a user