Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Update to 1.6.10 #93

Merged
merged 4 commits into from
Jan 14, 2022
Merged

Update to 1.6.10 #93

merged 4 commits into from
Jan 14, 2022

Conversation

DanielRBaird
Copy link
Contributor

No description provided.

@@ -97,9 +97,7 @@ public actual class CoroutineWorker internal actual constructor() {
repeatedlyCheckForCancellation(this.coroutineContext, cancelled) { completed }
// inside of a new CoroutineScope, so that child jobs are cancelled
coroutineScope {
autoreleasepool {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@benasher44 , any thoughts on this?

If we use the autorelease pool we end up with a test failure on withContext_across_threads.

objc[14264]: Invalid or prematurely-freed autorelease pool 0x7fd7dc80c048.
Child process terminated with signal 6: Abort trap

I'm uncertain why it is either invalid or prematurely freed, but I also don't know that we need the release pool.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I'll do some research and get back to you! We need an autoreleasepool since this is a thread managed by us (and not GCD, for example)—might just be some changes in 1.6.x that we need to take into account.

Copy link
Contributor

Choose a reason for hiding this comment

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

@DanielRBaird actually can you make a test that reproduces it, possibly? I'm surprised all tests have passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, they pass with the autorelease pool removed like I did here. If you undo this change it will fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah! Can you put it back? I'd like to open a KT ticket with the failure. This is prob a K/N bug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay according to the ticket, we can just remove this. This was added in #56, which predates Kotlin 1.4 (autoreleasepools added to Worker in 1.4.30)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. I'll do that. Thanks for helping investigate!

build.gradle.kts Outdated Show resolved Hide resolved
@DanielRBaird DanielRBaird merged commit ccd5770 into master Jan 14, 2022
@DanielRBaird DanielRBaird deleted the daniel/kotlinUpdate1.6.10 branch January 14, 2022 18:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants