4 ms·
No, the problems of threads don't carry over to processes, what you just said is exactly wrong and misunderstands the issues involved. Databases have transacti
by gnaritas 9y ago
No, the problems of threads don't carry over to processes, what you just said is exactly wrong and misunderstands the issues involved. Databases have transactions and processes don't share memory, those solve the problem with threading which is shared non transactional memory.
- zzzeek 9y agoTransactions lock and conflict with each other, so the metaphor holds fairly closely though not completely equivalent of course
- gnaritas 9y agoYes but these are recoverable states whereas threads suffer from partial reads in the middle of updates resulting in undefined unpredictable behavior. It's not a good metaphor to compare threads to processes as they suffer from vastly different failure modes and problems and are quite normally contrasted to each other as different solutions to concurrency problems.
- zzzeek 9y agothe reason people don't want to use threads is because they're afraid of having to understand race conditions. At that level, "you will have to understand race conditions no matter what" is the wisdom I derive from this particular metaphor.