A clock is one entity in a parallel system and promises are two objects.
promises are more a way to communicate between events on different timelines. They provide a way for a piece of code to receive a response without worrying about which mechanism will provide the response. the source code path can create a promise and pass it to two different code paths in the same thread or threads or agents or nodes in a distributed system. then when one of the threads / agents / refs needs an answer, it can block the promise without having to know anything about the entity that will fulfill the promise. And when another thread / agent / ref / other evaluates the response, it can fulfill the promise without having to know anything about the entity that is waiting for the promise (or not yet waiting).
promises are timing mechanisms that are independent of the mechanism used simultaneously.
A clock is a way of indicating the function of a call when an atom or reflex changes. this is a way of conveying intentions to all future states of a single agent / ref , saying, "Hey, make sure this condition is always true" or "register the change here."
Arthur ulfeldt
source share