The functions okay to call in signal handlers are called async-signal-safe functions. The term is a bit confusing! “async” here has nothing to do with async Rust. (In many ways it’s the opposite of async Rust, because the defining characteristic of async Rust is that you cannot just be interrupted or preempted at any time. You can only be interrupted at await points.)
in some ways i wish rust (and javascript before it) had settled on "cooperative multi-tasking" as the name to call it
"async" is not a good intuition because so many things can be asynchronous idk. "multi-tasking" even has a nice task {}
abbreviation you can use for the blocks that i think semantically describes what the closure is doing better
@jyn Hmm, well at least in Rust tasks are quite different, though I guess there would have been a different name for them in that world