https://github.com/mthom/scryer-prolog/discussions/3322
and also in the course of a discussion on various approaches to implement concurrency in Prolog:
https://github.com/mthom/scryer-prolog/discussions/3307