Mention benign data-race in getResult (#2663)
Addresses #2660
diff --git a/kotlinx-coroutines-core/common/src/CancellableContinuationImpl.kt b/kotlinx-coroutines-core/common/src/CancellableContinuationImpl.kt
index c310623..f74155e 100644
--- a/kotlinx-coroutines-core/common/src/CancellableContinuationImpl.kt
+++ b/kotlinx-coroutines-core/common/src/CancellableContinuationImpl.kt
@@ -260,9 +260,13 @@
// or we got async cancellation from parent.
if (trySuspend()) {
/*
+ * Invariant: parentHandle is `null` *only* for reusable continuations.
* We were neither resumed nor cancelled, time to suspend.
* But first we have to install parent cancellation handle (if we didn't yet),
* so CC could be properly resumed on parent cancellation.
+ *
+ * This read has benign data-race with write of 'NonDisposableHandle'
+ * in 'detachChildIfNotReusable'.
*/
if (parentHandle == null) {
installParentHandle()