2 ms·
Havoc Pennington wrote recently about synchronous and asynchronous APIs, with an interesting analysis of the differences between (synchronous) callbacks and (as
by cpeterso 15y ago
Havoc Pennington wrote recently about synchronous and asynchronous APIs, with an interesting analysis of the differences between (synchronous) callbacks and (asynchronous) events. He suggests that a callback should be either always sync or always async, as a documented part of the API contract.
Callbacks, synchronous and asynchronous:
http://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/ http://blog.ometer.com/2011/07/24/callbacks-synchronous-and-...