---
I thought WAM was single-threaded? It does a lot of trickery to simulate "fork, wait, and either kill parent or child" with no copying and minimal rollback, but most of that trickery relies on the absence of threading, and will explode in the presence of such hubristic assumptions as "once we've returned from a procedure, the old stack frame is freed and its memory can be re-used", "a clean-up procedure will be run when we drop objects", and "clean-up procedures do not need to be run when we drop objects".
I would be interested to see approaches that make it work in parallel. Even cheating with Unix and COW would be interesting: since Prolog predicates can have side-effects, a cut in an earlier branch would retroactively cancel the later branches you've eagerly executed in parallel. You'd either have to deal with that somehow (maybe with IO monads?), or invent some notion of (dependent?) purity and then ensure procedures in the dynamic procedure database remain correctly tagged with their purity, transitively (i.e., including all possible callees, unto the deepest generation). I'm not confident the speed-up would be worth the overhead, for most programs.
https://en.wikipedia.org/wiki/Threaded_code
https://archive.org/details/R.G.LoeligerThreadedInterpretive... - book on the topic