Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.ASIO "deasynchronisation"
From: Anthony Foiani (tkil_at_[hidden])
Date: 2010-02-25 21:31:37


>>>>> "Igore" == Igore Dmit <trueorca_at_[hidden]> writes:

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 <nat_at_[hidden]> 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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net