5 ms·
Um. Threads?
by dnaquin 18y ago
Um. Threads?
- apgwoz 18y agoNo, because threads can mutate global state. I would think this would be more like backtracking done in a side-effect free way.
- staticshock 18y agowhich is called a continuation
- dnaquin 18y agoThreads can mutate global state. They don't have to.
- apgwoz 18y agoof course they _can_ and don't have to, but just using threads doesn't meet the properties of the "world" construct.
- ggruschow 18y agofork(2) will do though.
- apgwoz 18y agobut, then you need to add some sort of IPC to the mix, because there's still a notion of "commit" for the mutation of state.
- ggruschow 18y agoI don't think you need it in all cases. For instance, if the "world" / "tab" knows that it's no good, it could self-exit. That'd leave only the "good" one standing without any coordination / communication. Or, in some other cases, return codes may be good enough. Even if it's easily possible with current stuff though, it's still an interesting idea.