ktor-samples icon indicating copy to clipboard operation
ktor-samples copied to clipboard

Eliminate potential conflict

Open MarcinMoskala opened this issue 5 years ago • 0 comments

number is in a critical section as modified by multiple threads - there is a possibility that two threads will try to modify it at the same time and so the result is uncertain. It either needs to be synchronized with Mutex, channel, or we need to use AtomicInteger.

MarcinMoskala avatar Nov 12 '19 16:11 MarcinMoskala