3 ms·
Don't forget you need to make sure your callback doesn't itself block, or take too long. (Which in turn implies that all the other libraries you are using --at
by crux_ 16y ago
Don't forget you need to make sure your callback doesn't itself block, or take too long.
(Which in turn implies that all the other libraries you are using --at least ones that need to communicate-- need to have pretty deep integration with your "good library," or you're going to be writing that integration yourself.)
(Not that threading is immune here... you need to be careful choosing libraries such that they are re-entrant, etc. But threading has held more mindshare for much longer, and most OSes share a roughly similar model, so they have a large head start on this front.)