-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
At present, there is a lot of special-purpose machinery around react/suspend to schedule the suspended continuation when it is invoked, ensure termination of the created facet, prevent multiple invocations of the continuation (!!?!?!) etc. I think it might be a lot simpler if instead we implemented it so that invoking the wrapped continuation just calls stop-facet on the created facet, with a call to the raw continuation inside the stop-facet. That should Do The Right Thing, given that stop-facet already transplants execution to the parent of the facet-being-terminated.
Something like this:
E[(react/suspend (k) P)] ==>
(let ((the-facet (current-facet-id)))
(react (let ((k (lambda (v) (stop-facet the-facet E[v])))) P)))The until macro would need to be adjusted to match, to say (on E (continue (void))) instead of the current (stop-when E (continue (void))).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels