Re:Ruby Methods Are Colorless
by modal-soul on Wednesday July 24, 2024 @01:44PM
(#41059657)
This is not true. If your sync function loops until the value is set, then the Promise will never resolve, since it never yields to the event loop.
No, it doesn't, closures let you update values in the wcope of the parent in .then() callbacks and then you can loop in the function and wait for completion and return a non-Promise value.