4 ms·
Which is not literally what I said.
by jstimpfle 5y ago
Which is not literally what I said.
- CyberDildonics 5y agoThey said you get a data race if you use read() and write() without file locks. You asked "Are you saying that without mmap() there will be data races??". No, they are saying you get a data race if you use read() and write() without file locks.
- jstimpfle 5y ago> No, they are saying you get a data race if you use read() and write() without file locks. Since you seem to understand better and my questions never made sense, maybe you can explain now why would we do that?
- CyberDildonics 5y agoThis is just goal post shifting. They said something that I thought was clear: you need file locks with read() and write(). I think you misunderstood that to mean only mmap can avoid data races. What they actually said was that using mmap allows atomics so you can avoid file locks.
- jstimpfle 5y ago> They said something that I thought was clear: you need file locks with read() and write(). You need _synchronization_. Not necessarily one of mmap() or file locks.
- CyberDildonics 5y agoYou need _synchronization_. This was never up for debate and is more diversion. Was someone "saying you have to use mmap or you get data races??" No, no one was saying that. You need it to do lock free synchronization because you need to map the same memory into two different processes to use atomics. That's the whole thing.