Skip to content

Commit d6ce8f4

Browse files
committed
Note on userland code
1 parent c972d4c commit d6ce8f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

content/fragments/testing-request-cancellation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ We had a situation a few days ago where a lazy loading problem in our Ruby code
99

1010
If the API stack's being bombarded by expensive requests that are largely being canceled early, it's a huge optimization to make sure that they only use the resources that they absolutely to. Requests discarded early stop executing immediately and no further effort is put toward servicing them.
1111

12-
In most code I've ever worked in, I could quite confidently answer the question above with a definitive and resounding "no". Doing a good job of request cancellation requires it be baked quite deeply into language and low level libraries, which isn't common. Also, cancelling a request midway in services that don't use transactions would be unacceptably dangerous -- [mutated state would be left mutated](/acid#atomicity), and that'd cause untold trouble later on.
12+
In most code I've ever worked in, I could quite confidently answer the question above with a definitive and resounding "no". Doing a good job of request cancellation requires it be baked quite deeply into language and low level libraries, which isn't common. And even when those handle it well, userland code usually doesn't. Also, cancelling a request midway in services that don't use transactions would be unacceptably dangerous -- [mutated state would be left mutated](/acid#atomicity), and that'd cause untold trouble later on.
1313

1414
## Cancellation in Go (#go-cancellation)
1515

0 commit comments

Comments
 (0)