private suspend fun evalAndAwait(evalBlock: suspend () -> Any?): Any? {
ensureNotClosed()
evalException = null
loadModules()
val result = jsResultMutex.withLock {
jsMutex.withLock { evalBlock() }
awaitAsyncJobs()
jsMutex.withLock { getEvaluateResult(context, globals) }
}
handleException()
return result
}
I have a JS call which will be delayed for 5 seconds, within the 5 second other evaluate calls block. I think it is the jsResultMutex here blocks other evaluate calls.
I have a JS call which will be delayed for 5 seconds, within the 5 second other
evaluatecalls block. I think it is thejsResultMutexhere blocks otherevaluatecalls.