Boost logo

Boost :

Subject: Re: [boost] [context] Implementation comments
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2011-01-19 10:17:44

Am 19.01.2011 12:40, schrieb Andrzej Krzemienski:
> Which somehow implied that Context is lower-level than Coroutine or Fiber.
> If you really treat Context the same level as Thread, I would suggest
> passing function<void()> as trampoline function. If you can afford using
> pimpl, you can easily change function<void()> to void(*)(void*) and void*
> parameters:
> void call( void* arg) {
> auto ptr = static_cast< function<void()>*>( arg );
> ptr->operator();
> }
> function<void()> trampoline = ...;
> context_impl( call,&trampoline );
> Using function<void()> makes it easier to understand for thread users and
> makes the interface similar to thread, task, etc...

It make the implementation in assembler much more complicated (call C++
conventions in assembler).

so long,

Boost list run by bdawes at, gregod at, cpdaniel at, john at