Re: [w3c/ServiceWorker] Experimenting with abortable algorithms (#1443)

I've used it in https://pr-preview.s3.amazonaws.com/w3c/ServiceWorker/pull/1443.html#register-algorithm + update if you're looking for a real world example.

"Abort when" is ok, but you often end up with really big blocks of steps, and it becomes difficult to associate the abort steps with the steps. Eg https://fetch.spec.whatwg.org/#http-network-or-cache-fetch.

The things I like about *this* proposal, is it's easy to check if a step has an appropriate abort step. And when editing, it's easier to remember to change the abort step if the main step is altered.

Also, the 'throwing' behaviour seems to work better if you have algorithms calling algorithms.

However, it may be possible to get these benefits in a less funky way.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1443#issuecomment-505479246

Received on Tuesday, 25 June 2019 14:50:42 UTC