-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
"A CPS handler could call the continuation function multiple times. I'm not sure how to prevent this, (or if I should) so don't do it..."
Just wanted to reply to this, you could encapsulate continuation inside an object with a queue of remaining continuations, when the "proxy" continuation is called it de-queues the next continuation in the queue and runs it passing it the request and the proxy continuation. Call to any continuation won't return until all the subsequent continuations are evaluated hence draining the queue, second calls to any continuation would raise some sort of error. Here is a very succinct implementation.
https://github.com/zendframework/zend-stratigility/blob/master/src/Next.php#L50
Metadata
Metadata
Assignees
Labels
No labels