Pagini recente » Diferente pentru blog/primul-post intre reviziile 6 si 5 | Diferente pentru utilizator/crys intre reviziile 1 si 2 | Diferente pentru blog/probability-shortlist intre reviziile 24 si 23 | Diferente pentru blog/intrebare-de-interviu-la-amazon intre reviziile 2 si 1 | Diferente pentru blog/counter intre reviziile 10 si 11
Diferente pentru
blog/counter intre reviziile
#10 si
#11
Nu exista diferente intre titluri.
Diferente intre continut:
print counter
==
Basically you're given 5 threads that each increment an integer variable _counter_ exactly 10 times. The variable isn't guarded by any lock. You can assume that reads and writes to the variable are atomic operations. What's the minimum value the counter can have after all threads finished.
The fact that the code is in Python doesn't really matter. Basically you're given 5 threads that each increment an integer variable _counter_ exactly 10 times. The variable isn't guarded by any lock. You can assume that reads and writes to the variable are atomic operations. What's the minimum value the counter can have after all threads finished.
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.