Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Resume continuation only once after handling model request #1124

Merged
merged 1 commit into from
Sep 20, 2018

Conversation

bamboo
Copy link
Member

@bamboo bamboo commented Sep 20, 2018

Resume continuation outside the try block to avoid double resuming (first via resume then later with resumeWithException).

Exceptions thrown by the continuation are simply logged.

Outside the try block to avoid double resuming (first via `resume`
then later with `resumeWithException`).

Exceptions thrown by the continuation are simply logged.
@bamboo bamboo added this to the 1.0-RC7 milestone Sep 20, 2018
@bamboo bamboo self-assigned this Sep 20, 2018
Copy link
Member

@eskatos eskatos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will make this more robust.

FTR this change was triggered by the following stacktrace shown by IntelliJ after a long period of inactivity.

@eskatos
Copy link
Member

eskatos commented Sep 20, 2018

java.lang.IllegalStateException: Already resumed
    at kotlin.coroutines.experimental.SafeContinuation.resumeWithException(SafeContinuationJvm.kt:63)
    at org.gradle.kotlin.dsl.resolver.RequestQueue$eventLoop$1.invoke(KotlinBuildScriptDependenciesResolver.kt:220)
    at org.gradle.kotlin.dsl.resolver.RequestQueue$eventLoop$1.invoke(KotlinBuildScriptDependenciesResolver.kt:206)
    at org.gradle.kotlin.dsl.concurrent.EventLoop$newConsumerThread$1.invoke(EventLoop.kt:51)
    at org.gradle.kotlin.dsl.concurrent.EventLoop$newConsumerThread$1.invoke(EventLoop.kt:26)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

@eskatos eskatos merged commit dd0deb7 into develop Sep 20, 2018
@bamboo bamboo deleted the bamboo/fix-RequestQueue branch November 13, 2018 16:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants