From 6150dcd14773517d5c0fff0fee7bc6fe6f75e086 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Mon, 23 Aug 2021 23:49:17 -0700 Subject: thunk_h: bump submodule for new lifecycle model Udpate thunk usage througout to explicitly control thunk instance lifecycles from calleees according to new model. This enables discarding a bunch of the per-object dispatch thunks, eliminates some thunk leaks, and I think generally makes the code more expressive and clear about what's going on. Keep in mind this is all experimental and and I'm not spending a whole lot of time on this, it's mostly a toy and exploring some different programming styles I'd never really consider for production/real work. Though it actually has some interesting properties, and produces some surprisingly succinct and readable listings at times once you have the cumbersome building blocks in place. Especially for non-daemon programs where you can basically either log+ignore errors or treat them as fatal, I think this programming style might actually have its place. --- src/machid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/machid.c') diff --git a/src/machid.c b/src/machid.c index adc3ca0..5edd24a 100644 --- a/src/machid.c +++ b/src/machid.c @@ -51,7 +51,7 @@ THUNK_DEFINE_STATIC(have_machid, iou_t *, iou, char *, buf, size_t *, size, char if (!*res_ptr) return -ENOMEM; - return thunk_dispatch(closure); + return thunk_end(thunk_dispatch(closure)); } -- cgit v1.2.3