ankur samarya
04/18/2025, 7:15 PMephemient
04/18/2025, 7:19 PMankur samarya
04/18/2025, 7:53 PMobject Singleton{
suspend fun test(){
...
}
}
we will access this test()
method from coroutine, and there might be some possibility of synchronization issue?ephemient
04/18/2025, 7:54 PMSingleton
will block in the classloader, under the class loading lock, until the object is initialized. that is JVM behaviorankur samarya
04/18/2025, 8:02 PMobject
classes inside coroutines? Is there any correlation with coroutines then?ephemient
04/18/2025, 8:38 PM