@@ -210,7 +210,7 @@ internal open class CancellableContinuationImpl<in T>(
210
210
is Segment <* > -> callSegmentOnCancellation(state, cause)
211
211
}
212
212
// Complete state update
213
- detachChildIfNonResuable ()
213
+ detachChildIfNonReusable ()
214
214
dispatchResume(resumeMode) // no need for additional cancellation checks
215
215
return true
216
216
}
@@ -220,7 +220,7 @@ internal open class CancellableContinuationImpl<in T>(
220
220
if (cancelLater(cause)) return
221
221
cancel(cause)
222
222
// Even if cancellation has failed, we should detach child to avoid potential leak
223
- detachChildIfNonResuable ()
223
+ detachChildIfNonReusable ()
224
224
}
225
225
226
226
private inline fun callCancelHandlerSafely (block : () -> Unit ) {
@@ -500,7 +500,7 @@ internal open class CancellableContinuationImpl<in T>(
500
500
is NotCompleted -> {
501
501
val update = resumedState(state, proposedUpdate, resumeMode, onCancellation, idempotent = null )
502
502
if (! _state .compareAndSet(state, update)) return @loop // retry on cas failure
503
- detachChildIfNonResuable ()
503
+ detachChildIfNonReusable ()
504
504
dispatchResume(resumeMode) // dispatch resume, but it might get cancelled in process
505
505
return // done
506
506
}
@@ -536,7 +536,7 @@ internal open class CancellableContinuationImpl<in T>(
536
536
is NotCompleted -> {
537
537
val update = resumedState(state, proposedUpdate, resumeMode, onCancellation, idempotent)
538
538
if (! _state .compareAndSet(state, update)) return @loop // retry on cas failure
539
- detachChildIfNonResuable ()
539
+ detachChildIfNonReusable ()
540
540
return RESUME_TOKEN
541
541
}
542
542
is CompletedContinuation <* > -> {
@@ -557,7 +557,7 @@ internal open class CancellableContinuationImpl<in T>(
557
557
}
558
558
559
559
// Unregister from parent job
560
- private fun detachChildIfNonResuable () {
560
+ private fun detachChildIfNonReusable () {
561
561
// If instance is reusable, do not detach on every reuse, #releaseInterceptedContinuation will do it for us in the end
562
562
if (! isReusable()) detachChild()
563
563
}
0 commit comments