30 May
2008
30 May
'08
5:33 p.m.
I noticed that there are couple of async_XXX methods, such as async_wait, async_connect, async_write and async_fill. Just wondering why we need those async_XXX methods? without the "async", those methods will block the execution and next statements will be deferred. with the "async", those methods will return immediately and the work will be deferred a little time but will still be executed in the same thread. I feel it confuses people. If we need next statements being executed immediately, we can use another thread to do the wait, connect, write or fill. It is more clear and clean. And the user/programmer has fully control on this. Maybe I have missed something here. please give me your comments. thanks, James