CS Electrical And Electronics
@cselectricalandelectronics

@Synchronized fun getState(): what is this mean in kotlin

All QuestionsCategory: Kotlin@Synchronized fun getState(): what is this mean in kotlin
chetan shidling asked 3 years ago

I need an explanation.

1 Answers
chetan shidling answered 3 years ago

The situation comes where sometimes multiple threads try to access the same resources, so synchronization makes the threads to work synchronously to avoid conflicts.