Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce CoroutineStackFrame and implement it in SuspendFunctionGun … #784

Merged
merged 3 commits into from
Dec 13, 2018

Conversation

qwwdfsad
Copy link
Contributor

…reusable completion in order to properly walk through stackframes of interceptors

…reusable completion in order to properly walk through stackframes of interceptors
private var index = 0

override fun finish() {
index = blocks.size
}

override suspend fun proceed(): TSubject = suspendCoroutineUninterceptedOrReturn { continuation ->
proceedContinuation = continuation
Copy link
Contributor

@cy6erGn0m cy6erGn0m Dec 11, 2018

Choose a reason for hiding this comment

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

proceed() could be invoked multiple times: this is why continuations are stacked in this case. Shouldn't proceedContinuation be restored back when leaving a proceed level?

…ke stack of the interceptor walkable once per rootContinuation state change in order to provide diagnostic in 99% of use-cases
@cy6erGn0m cy6erGn0m merged commit b93daad into master Dec 13, 2018
@cy6erGn0m cy6erGn0m deleted the suspend-gun-stackwalking branch December 13, 2018 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants