mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
Update General Threading Rules to Threading Model (labels and links)
GitOrigin-RevId: 45406f37f0c5387267708a880de123bd7972f5ac
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bba418960e
commit
d254beda2b
@@ -51,7 +51,7 @@ import java.util.concurrent.Future;
|
|||||||
* <p>
|
* <p>
|
||||||
* If there are read actions running at this moment {@code runWriteAction} is blocked until they are completed.
|
* If there are read actions running at this moment {@code runWriteAction} is blocked until they are completed.
|
||||||
* <p>
|
* <p>
|
||||||
* See also <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>.
|
* See also <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>.
|
||||||
*/
|
*/
|
||||||
public interface Application extends ComponentManager {
|
public interface Application extends ComponentManager {
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* See <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
*
|
*
|
||||||
* @param <T> Result type.
|
* @param <T> Result type.
|
||||||
* @see WriteAction
|
* @see WriteAction
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import javax.swing.*;
|
|||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* See <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
*
|
*
|
||||||
* @param <T> Result type.
|
* @param <T> Result type.
|
||||||
* @see ReadAction
|
* @see ReadAction
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.ApiStatus;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* See <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
*
|
*
|
||||||
* @see ReadAction
|
* @see ReadAction
|
||||||
* @see WriteAction
|
* @see WriteAction
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.lang.annotation.*;
|
|||||||
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
||||||
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
||||||
*
|
*
|
||||||
* @see <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* @see <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
* @see Application#assertIsNonDispatchThread()
|
* @see Application#assertIsNonDispatchThread()
|
||||||
* @see Application#executeOnPooledThread(Runnable)
|
* @see Application#executeOnPooledThread(Runnable)
|
||||||
* @see Task.Backgroundable
|
* @see Task.Backgroundable
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import java.lang.annotation.*;
|
|||||||
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
||||||
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
||||||
*
|
*
|
||||||
* @see <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* @see <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
* @see Application#assertIsDispatchThread()
|
* @see Application#assertIsDispatchThread()
|
||||||
* @see Application#invokeLater(Runnable, ModalityState)
|
* @see Application#invokeLater(Runnable, ModalityState)
|
||||||
* @see Application#invokeAndWait(Runnable, ModalityState)
|
* @see Application#invokeAndWait(Runnable, ModalityState)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import java.lang.annotation.*;
|
|||||||
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
||||||
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
||||||
*
|
*
|
||||||
* @see <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* @see <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
* @see ThreadingAssertions#assertReadAccess()
|
* @see ThreadingAssertions#assertReadAccess()
|
||||||
* @see ReadAction#run(ThrowableRunnable)
|
* @see ReadAction#run(ThrowableRunnable)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package com.intellij.util.concurrency.annotations;
|
package com.intellij.util.concurrency.annotations;
|
||||||
|
|
||||||
import com.intellij.openapi.application.Application;
|
import com.intellij.openapi.application.Application;
|
||||||
@@ -20,7 +20,7 @@ import java.lang.annotation.*;
|
|||||||
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
||||||
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
||||||
*
|
*
|
||||||
* @see <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* @see <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
* @see Application#assertReadAccessNotAllowed()
|
* @see Application#assertReadAccessNotAllowed()
|
||||||
* @see ReadAction#run(ThrowableRunnable)
|
* @see ReadAction#run(ThrowableRunnable)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import java.lang.annotation.*;
|
|||||||
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
* <b>Important:</b> the instrumentation has limitations. Please read the docs
|
||||||
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
* of the {@link org.jetbrains.jps.devkit.threadingModelHelper} to learn about them.
|
||||||
*
|
*
|
||||||
* @see <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* @see <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
* @see Application#assertWriteAccessAllowed()
|
* @see Application#assertWriteAccessAllowed()
|
||||||
* @see WriteAction#run(ThrowableRunnable)
|
* @see WriteAction#run(ThrowableRunnable)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public interface ComponentManager extends UserDataHolder, Disposable, AreaInstan
|
|||||||
* or is about to be disposed (e.g. the {@link com.intellij.openapi.project.impl.ProjectExImpl#dispose()} was called but not completed yet)
|
* or is about to be disposed (e.g. the {@link com.intellij.openapi.project.impl.ProjectExImpl#dispose()} was called but not completed yet)
|
||||||
* <br>
|
* <br>
|
||||||
* The result is only valid inside read action because the application/project/module can be disposed at any moment.
|
* The result is only valid inside read action because the application/project/module can be disposed at any moment.
|
||||||
* (see <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">more details on read actions</a>)
|
* (see <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">more details on read actions</a>)
|
||||||
*/
|
*/
|
||||||
boolean isDisposed();
|
boolean isDisposed();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package com.intellij.openapi.progress;
|
package com.intellij.openapi.progress;
|
||||||
|
|
||||||
import com.intellij.openapi.diagnostic.ControlFlowException;
|
import com.intellij.openapi.diagnostic.ControlFlowException;
|
||||||
@@ -20,7 +20,7 @@ import java.util.concurrent.CancellationException;
|
|||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @see com.intellij.openapi.progress.ProgressIndicator#checkCanceled()
|
* @see com.intellij.openapi.progress.ProgressIndicator#checkCanceled()
|
||||||
* @see <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* @see <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
*/
|
*/
|
||||||
public class ProcessCanceledException extends CancellationException implements ControlFlowException {
|
public class ProcessCanceledException extends CancellationException implements ControlFlowException {
|
||||||
public ProcessCanceledException() { }
|
public ProcessCanceledException() { }
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ fun doSomething() {
|
|||||||
while <code>com.intellij.openapi.progress.CoroutinesKt.checkCancelled()</code> should be used in suspending one.
|
while <code>com.intellij.openapi.progress.CoroutinesKt.checkCancelled()</code> should be used in suspending one.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
See <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html#background-processes-and-processcanceledexception">Background Processes and ProcessCanceledException</a> in IntelliJ Platform Plugin SDK docs for more details.
|
See <a href="https://plugins.jetbrains.com/docs/intellij/background-processes.html#cancellation">Background Processes Cancellation</a> in IntelliJ Platform Plugin SDK docs for more details.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- tooltip end -->
|
<!-- tooltip end -->
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
package org.jetbrains.idea.devkit.threadingModelHelper;
|
package org.jetbrains.idea.devkit.threadingModelHelper;
|
||||||
|
|
||||||
import com.intellij.openapi.application.Application;
|
import com.intellij.openapi.application.Application;
|
||||||
@@ -28,7 +28,7 @@ import static com.intellij.util.concurrency.ThreadingAssertions.*;
|
|||||||
* Note that if this happens, you need to update the instrumenter and install the updated version of the devkit to IDEA.
|
* Note that if this happens, you need to update the instrumenter and install the updated version of the devkit to IDEA.
|
||||||
* <p/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @see <a href="https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html">General Threading Rules</a>
|
* @see <a href="https://plugins.jetbrains.com/docs/intellij/threading-model.html">Threading Model</a>
|
||||||
*/
|
*/
|
||||||
public class TMHIntegrationTest extends LightPlatformTestCase {
|
public class TMHIntegrationTest extends LightPlatformTestCase {
|
||||||
private ExecutorService mySingleThreadExecutor;
|
private ExecutorService mySingleThreadExecutor;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||||
@file:JvmName("CheckCancelledLockUtils")
|
@file:JvmName("CheckCancelledLockUtils")
|
||||||
package org.jetbrains.kotlin.idea.base.util
|
package org.jetbrains.kotlin.idea.base.util
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ inline fun <T> ReentrantReadWriteLock.writeWithCheckCanceled(action: () -> T): T
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* It is preferable to use [CheckCanceledLock] instead of [ReentrantLock] in case of mix of
|
* It is preferable to use [CheckCanceledLock] instead of [ReentrantLock] in case of mix of
|
||||||
* [IntelliJ Read-Write locks](https://plugins.jetbrains.com/docs/intellij/general-threading-rules.html) and regular locks.
|
* [IntelliJ Read-Write locks](https://plugins.jetbrains.com/docs/intellij/threading-model.html) and regular locks.
|
||||||
*
|
*
|
||||||
* To acquire lock has to be cancellable action as read actions.
|
* To acquire lock has to be cancellable action as read actions.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user