3 ms·
“Cancelation” should really be added to the “hard CS problems” list. Like the others on that list (off by one, cache invalidation etc) it isn’t actually hard-h
by klabb3 3y ago
“Cancelation” should really be added to the “hard CS problems” list.
Like the others on that list (off by one, cache invalidation etc) it isn’t actually hard-hard, but rather underestimated and overlooked.
I think if we took half the time we spend on creation, constructors, initialization, and spent that design time thinking about destruction, cleanup, teardown, cancelation etc, we’d have a lot fewer bugs, in particular resource exhaustion bugs.
- jart 3y agoI know that's true of C libraries. POSIX thread cancelation is one of those things where its mere existence pervades everything in its implications.
- pornel 3y agoI really like Rust's async for its ability to immediately cancel Futures, the entire call stack together, at any await point, without needing cooperation from individual calls.
- winternewt 3y agoHow is that possible if e.g. an external SQL server needs to be told that the operation should be canceled?