File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
kotlinx-coroutines-debug/src Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public class CoroutinesBlockHoundIntegration : BlockHoundIntegration {
1919 allowServiceLoaderInvocationsOnInit()
2020 allowBlockingCallsInReflectionImpl()
2121 allowBlockingCallsInDebugProbes()
22+ allowBlockingCallsInWorkQueue()
2223 // Stacktrace recovery cache is guarded by lock
2324 allowBlockingCallsInside(" kotlinx.coroutines.internal.ExceptionsConstructorKt" , " tryCopyException" )
2425 /* The predicates that define that BlockHound should only report blocking calls from threads that are part of
@@ -62,6 +63,14 @@ public class CoroutinesBlockHoundIntegration : BlockHoundIntegration {
6263 }
6364 }
6465
66+ /* *
67+ * Allow blocking calls inside [kotlinx.coroutines.scheduling.WorkQueue]
68+ */
69+ private fun BlockHound.Builder.allowBlockingCallsInWorkQueue () {
70+ /* * uses [Thread.yield] in a benign way. */
71+ allowBlockingCallsInside(" kotlinx.coroutines.scheduling.WorkQueue" , " addLast" )
72+ }
73+
6574 /* *
6675 * Allows blocking inside [kotlinx.coroutines.internal.ThreadSafeHeap].
6776 */
You can’t perform that action at this time.
0 commit comments