[AA] KT-58257 Restore timing guarantees of module state modification events
- Specifically for non-global module state modification, we can guarantee that the event is published before the module is modified. This allows subscribers to use the provided `KtModule` without needing to fear that the module has already been disposed (in case of removal).
This commit is contained in:
committed by
Space Team
parent
2023c08459
commit
d2b05b8f4f
+2
-2
@@ -9,8 +9,8 @@ import org.jetbrains.kotlin.analysis.project.structure.KtModule
|
||||
|
||||
public fun interface KotlinModuleStateModificationListener {
|
||||
/**
|
||||
* [onModification] is invoked in a write action before or after the [module] is moved, removed, or its structure is changed.
|
||||
* [isRemoval] signals if the event is a removal.
|
||||
* [onModification] is invoked in a write action *before* the [module] is moved, removed, or its structure is changed. [isRemoval]
|
||||
* signals if the event is a removal.
|
||||
*/
|
||||
public fun onModification(module: KtModule, isRemoval: Boolean)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user