2 ms·
By this definition, every access to a shared resource is a race condition, e.g. even when properly acquiring a lock. It is common knowledge that you introduce l
by remram 4y ago
By this definition, every access to a shared resource is a race condition, e.g. even when properly acquiring a lock. It is common knowledge that you introduce locks to remove race conditions so I would say something is definitely missing from the definition.
- chrisseaton 4y agoUsually you’re adding locks not to remove the race condition but to make them not a bug.
- remram 4y agoThat is a valid definition but it's not the one used by everyone I know and work with. A race condition is a fault, just like a SQL injection; it could easily have referred to a programming technique but it doesn't.
- asveikau 4y agoI think "remove" the race condition is the wrong word. It should be "resolve" the race conditions. The race exists because there are multiple accesses. This is resolved when there is a protocol for deciding who proceeds and who waits for the other.