...

/

Solution: The Problem with Shared State

Solution: The Problem with Shared State

See the solution to the challenge.

We'll cover the following...

Solution

The solution to the challenge we just solved is as follows.

// Write your code here

suspend fun main() {
    val mutex = Mutex()

    delay(2000)
    println("Educative")
    mutex.withLock {
        mutex.withLock {
            println("Inc.")
        }
    }
}
Solution to the challenge

Here is a ...