← Quiz: Threads, Processes and the GIL: all 10 questions
Quiz: Threads, Processes and the GIL · Question 4 of 10
What is a race condition?
What is a race condition?
- A.A thread that runs faster than the others
- B.An error raised when too many threads start
- C.A bug where the result depends on the timing of threads that share data
- D.A loop that never ends
Answer & explanation
Correct answer: A bug where the result depends on the timing of threads that share data
Two threads read the same old value and one update overwrites the other.
Can you get the rest right without peeking?
Take the timed Quiz: Threads, Processes and the GIL quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →