[Ns-developers] ns-3: coroutines?
gjcarneiro at gmail.com
Fri Oct 20 06:21:48 PDT 2006
On 10/20/06, Mathieu Lacage <Mathieu.Lacage at sophia.inria.fr> wrote:
> On Thu, 2006-10-19 at 18:21 +0100, Gustavo Carneiro wrote:
> > Sorry if this has already been discussed, but I was wondering if the
> > subject of coroutine support has ever been discussed in the context of
> > NS-3. The current architecture supports "timeout" events with
> > IMHO, excessive use of callbacks leads to code difficult to develop and
> > difficult to read. Some simulators out there support coroutines, which
> > allow one function to block waiting for events. The main advantage of
> > is that it is much easier to e.g. map an SDL diagram into code, and
> > variables are preserved even when waiting for events.
> > Implementation-wise, a quick search tells me there exist coroutine
> > implementations for C/C++ out there. And it should be possible to
> > coroutines and callbacks concurrently in a simulator.
> > What do people think of this?
> They are already implemented in yans and the plan is to port this
> component of yans in ns-3. (look in the src/thread) directory.
Gustavo J. A. M. Carneiro
"The universe is always one step beyond logic."
More information about the Ns-developers