Re:Show HN: Ts-Chan – Go-Like Concurrency Primitives for Typ...
by joeycumines on Monday November 06, 2023 @03:11AM
(#38159962)
If you want it to run on exiting the function in reverse order, something like Python's context managers would probably be necessary.
I've dabbled in that too, though I don't actually use it for anything, currently: https://github.com/Mcsavvy/contextlib/pull/1
I guess a JavaScript defer could just be enqueueMicrotask and an anonymous arrow function?