[squeak-dev] Debugging of other processes with wait
Robert Withers
robert.withers at pm.me
Thu Jul 23 18:00:57 UTC 2020
Hi Jakob,
I have asked you several times to comment on the Promise implementation in PromisesLocal, but you have not responded. This is unfortunate.
> Installer ss project: 'Cryptography'; install: 'PromisesLocal'.
Although the Promise defined in Kernel-Processes has #wait protocol, this is really an anathema to Promise-style control flow. The #whenResolved: protocol should be used to register a reactor and no waits should occur.
One issue immediately apparent is that there is no event loop (In the PriorityVat) that secures single-threaded behavior in the promise. In PromisesLocal there is a LocalResolver who forwards all pending #whenResolved: messages to the new reference, on the event-loop Process (calls #redirectEventualMessage:).
See ERef #promiseInVat: for the pair production of an asociation with a PromiseERef and a LocalResolver. There is no equivalent to this in Kernel-Processes.
Promise-style control flow does not use mutexes nor semaphores. So I believe the fundamental model here is misused.
You said:
On 7/23/20 12:57 PM, Jakob Reschke wrote:
> To move away from modal dialogs, nesting the world loop,
> and from writing all the business logic in a promise-style control
> flow
So it is your intention to "move away from promise-style control flow." then I would suggest not using a Promise.
Kindly,
rabbit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200723/8b4a9187/attachment.html>
More information about the Squeak-dev
mailing list
|