3 ms·
I think you might possibly be overstating how complex a race condition needs to be. For example two consumers pushing results to a single result queue is a rac
by chrisseaton 7y ago
I think you might possibly be overstating how complex a race condition needs to be.
For example two consumers pushing results to a single result queue is a race condition, because the order in which they arrive depends on timing and is non-deterministic. That's a pretty normal thing to have.
Many languages people think of as being safe and high level are extremely racey - Erlang is my go-to example - two processes sending messages to a third is a race. Which message do you get first? It's non-deterministic. But it doesn't have to be a problem.
- isaachier 7y agoWhat you are describing sounds like non-deterministic behavior of a thread-safe primitive, e.g. non-deterministic ordering in a synchronized queue. On the other hand, a true race condition in the queue could mean messages overwriting each other.
- chrisseaton 7y ago> What you are describing sounds like non-deterministic behavior of a thread-safe primitive, e.g. non-deterministic ordering in a synchronized queue. That's what a race condition is - non-deterministic behavior of a thread-safe primitive. > On the other hand, a true race condition in the queue could mean messages overwriting each other. That's a data race, not a race condition.
- deleted 7y ago[deleted]