> My problem is that any synchronous-access
> function breaks into many little functions that do some part of job and
> invoke async operation with "next" function as a handler, it makes the
> code really ugly and obfuscating.
I know exactly what you mean. We've started using the proposed
Boost.Coroutine library (not yet official, a Google Summer of Code
effort plus some bug fixes). You might be interested that the original
author specifically targets use with ASIO.
http://www.crystalclearsoftware.com/soc/coroutine/index.html
http://www.crystalclearsoftware.com/soc/coroutine/coroutine/asio.html
http://www.boostpro.com/vault/index.php?action=downloadfile&filename=boost-coroutine-2009-12-01.tar.gz&directory=Concurrent%20Programming&
A couple of the bundled tests are built around ASIO.
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Igore> My problem is that any synchronous-access function breaks into
Igore> many little functions that do some part of job and invoke async
Igore> operation with "next" function as a handler, it makes the code
Igore> really ugly and obfuscating.
>>>>> "Nat" == Nat Goodspeed <n...@lindenlab.com> writes:
Nat> I know exactly what you mean. We've started using the proposed
Nat> Boost.Coroutine library (not yet official, a Google Summer of
Nat> Code effort plus some bug fixes). You might be interested that
Nat> the original author specifically targets use with ASIO.
The main author of ASIO itself is also a big proponent of using
coroutines, and he demonstrates some tricks for using them cleanly on
top of ASIO:
http://blog.think-async.com/2009/07/wife-says-i-cant-believe-it-works.html
http://blog.think-async.com/2009/08/secret-sauce-revealed.html
http://blog.think-async.com/2009/08/composed-operations-coroutines-and-code.html
One more option to investigate...
Happy Hacking,
t.
> The main author of ASIO itself is also a big proponent of using
> coroutines, and he demonstrates some tricks for using them cleanly on
> top of ASIO:
>
> http://blog.think-async.com/2009/07/wife-says-i-cant-believe-it-
works.html
> http://blog.think-async.com/2009/08/secret-sauce-revealed.html
> http://blog.think-async.com/2009/08/composed-operations-coroutines-and-
code.html
>
Also see the new http example #4 in Boost 1.42,
Cheers,
Rutger