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

Improve Concurrency Documentation #3740

Closed
brendanw opened this issue Jan 1, 2020 · 1 comment
Closed

Improve Concurrency Documentation #3740

brendanw opened this issue Jan 1, 2020 · 1 comment

Comments

@brendanw
Copy link

brendanw commented Jan 1, 2020

It would be great if it were clarified in https://github.com/JetBrains/kotlin-native/blob/master/CONCURRENCY.md that any time an object is referenced by two functions that can change the coroutine context (eg async, launch, withContext, suspending function) that the object will be frozen. It'd be helpful to drive home the point by showing an example where the coroutine is executed on a single thread but objects are still frozen.

This came up as a problem here ktorio/ktor#1537

@benasher44
Copy link
Contributor

This probably belongs as documentation in the coroutines library for native mt coroutines when it's released, since this is behavior controlled by that library

@brendanw brendanw closed this as completed Jan 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants