Skip to content

Delegate properties to atomics #3265

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

Closed
wants to merge 7 commits into from
Closed

Conversation

mvicsokolova
Copy link
Contributor

No description provided.

@mvicsokolova mvicsokolova requested a review from qwwdfsad April 27, 2022 08:28
@@ -104,9 +104,7 @@ private class AwaitAll<T>(private val deferreds: Array<out Deferred<T>>) {
lateinit var handle: DisposableHandle

private val _disposer = atomic<DisposeHandlersOnCancel?>(null)
var disposer: DisposeHandlersOnCancel?
Copy link
Collaborator

Choose a reason for hiding this comment

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

while we are here, it seems like it should just be

@Volatile
private var disposer: DisposeHandlersOnCancel? = null

@@ -62,6 +62,7 @@ public class kotlinx/coroutines/CancellableContinuationImpl : kotlin/coroutines/
public fun getContinuationCancellationCause (Lkotlinx/coroutines/Job;)Ljava/lang/Throwable;
public final fun getResult ()Ljava/lang/Object;
public fun getStackTraceElement ()Ljava/lang/StackTraceElement;
public final fun getState$kotlinx_coroutines_core ()Ljava/lang/Object;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please investigate why these getters are now considered public. It seems like a specific attribute is missing from metadata

@qwwdfsad
Copy link
Collaborator

Any update about this one?

@mvicsokolova
Copy link
Contributor Author

Depends on this: #3501
Waiting for the declarations visibility fix in 1.7.21

@mvicsokolova
Copy link
Contributor Author

There was a bug revealed on JS IR side with Kotlin 1.7.20: private delegated properties caused an error at runtime, the corresponding issue: Kotlin/kotlinx-atomicfu#260.

The fix in the compiler plugin will be provided with Kotlin 1.8.0-RC

@qwwdfsad
Copy link
Collaborator

qwwdfsad commented Feb 15, 2023

jvm-ir transformer along with 1.8.10 Kotlin are in develop

@qwwdfsad
Copy link
Collaborator

qwwdfsad commented Jun 29, 2023

Can be opened as a new PR to avoid restoring all the context incrementally

@qwwdfsad qwwdfsad closed this Jun 29, 2023
@qwwdfsad qwwdfsad deleted the atomicfu-delegated branch April 4, 2024 09:23
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