Re:Write logic, not mechanics
by lucian1900 on Thursday April 19, 2012 @07:19AM
(#3862383)
I think the OP refers to the syntax/API for each. If you're already using async APIs, adding a sync one that runs in a separate thread won't change much.
On the other hand, you need something like CPS or coroutines to cleanly use an async function in a program mostly using sync APIs.
Of course, if you have the right tools (CPS/coroutines) you can make any async API look sync, as you said.
On the other hand, you need something like CPS or coroutines to cleanly use an async function in a program mostly using sync APIs.
Of course, if you have the right tools (CPS/coroutines) you can make any async API look sync, as you said.