summaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-08-23 20:17:16 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-08-23 20:26:16 -0700
commit61e02a7895b05debe5328439b3ef3f5cfdb438cb (patch)
tree5a530c4043327c35a752311a64cddfe6f57498d1 /COPYING
parentcaa8f4319a8e9ef096e03857f0f85b48c0930a5e (diff)
thunk: add some helpers for filtering thunk returns
Naming may evolve in future... thunk_mid(): pass-through negative values, otherwise return 1 "mid" name is used as this is intended to return the "keep me around" value for mid-phase iterative processing. thunk_end(): pass-through negative values, otherwise return 0 "end" name is used as this indicates "don't keep me around for reuse, fin!" In experimental code using this header it became common for thunk implementations to return straight from thunk_dispatch() or bare calls to other thunkified functions. This is convenient for propagating out fatal errors, but now that return value influences lifecycle, these blind propagating returns as-is in non-error scenarios would be propagating lifecycle controls out from a totally unrelated context. These helpers are intended to wrap those call sites, blindly propagating only errors, but otherwise being opinionated about lifecycle. Now it's kind of expected that every thunk implementation will have its return paths covered with thunk_end() and/or thunk_mid() calls, or just bare non-propagated return values. This is all still very experimental, and shouldn't be considered production code, it's mostly just a curiosity.
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions
© All Rights Reserved