4 ms·
Callbacks cause no resource retention other than the closure whereas context switching incurs a much greater hit.
by eulerphi 13y ago
Callbacks cause no resource retention other than the closure whereas context switching incurs a much greater hit.
- moe 13y agoCallbacks cause no resource retention They do cause resource exhaustion in the developer who has to deal with the cascading callback spaghettis.
- justincormack 13y agoDepends what you switch to. Coroutine's just need a C stack for example.
- ori_b 13y agoCooperative context switching within a process is just a register swap. It's about the same cost as a function call.