21 Apr
2013
21 Apr
'13
7:31 a.m.
I do not believe in wrappers. There are too many async libraries out there to write wrappers for each one.
I agree the focus should be on a generic solution. However, wrappers can offer better abstractions. With CppAwait you can take some blocking Asio code and make it asynchonous almost mechanically. This is because the wrapper takes care of converting error codes into exceptions, and deals with task interruption. The benefits become more obvious as you start to compose tasks. So, I think exposing every async operation as a boost::task is good. Hand-writing wrappers for each async function is bad. Best regards, Valentin