4 ms·
Isn't that a natural, expected part of concurrent programming? If it has to happen in a particular order, you can't do it concurrently.
by emodendroket 6y ago
Isn't that a natural, expected part of concurrent programming? If it has to happen in a particular order, you can't do it concurrently.
- chrisseaton 6y ago> Isn't that a natural, expected part of concurrent programming? No races aren't an inherent part of concurrent programming - you can make it safe. > If it has to happen in a particular order, you can't do it concurrently. I didn't say things had to happen in a particular order, just that their results are merged in a well-defined order. Otherwise you could test against one particular ordering that happens by chance, and then in production you get another order by chance that you didn't test against and it doesn't work! That's what you get with Go.
- emodendroket 6y agoRaces no, but messages coming out of order? You just want to structure your messages in a way that the order doesn't matter
- chrisseaton 6y ago> Races no, but messages coming out of order? Messages coming out of order are a cause of race conditions. > You just want to structure your messages in a way that the order doesn't matter Right... just program without bugs and you won't have any bugs! The problem is people forget to do this, or think they're doing it when they aren't, and they get a failure one in a million. I've done it myself! Why not use a system where it's impossible to depend on message order in the first place?
- emodendroket 6y agoIf you've got a system that makes concurrent programming just as easy as non-concurrent programming I'm sure people are willing to throw a lot of money at you. I'm not aware of any way of doing it that frees you from structuring things so that the order that operations happen in is not important.