3 ms·
Is deadlock considered a race condition? I typically think of a race condition an issue with concurrency where data might be modified by another thread which c
by mateo411 6y ago
Is deadlock considered a race condition?
I typically think of a race condition an issue with concurrency where data might be modified by another thread which causes the program to return incorrect results.
- gpderetta 6y agoYou can have race conditions with message passing.
- mateo411 6y agoYes, that makes sense. A race condition happens when data/state is mutated because of the order in which concurrent processes occur. This could happen with threads, message passing, or many other ways. I think this is distinct from deadlock which occurs when there is at least one circular dependency in the order when different "processes" must perform their operations.
- spooneybarger 6y agoI think this might help: Data race vs race condition: https://blog.regehr.org/archives/490 https://blog.regehr.org/archives/490
- mateo411 6y agoThat is helpful. I was thinking that a race condition would only include a data race, but this blog defined it broader, so that it would include deadlock.
- stouset 6y agoDeadlock is one common symptom of a race condition.