Boost logo

Boost :

Subject: Re: [boost] [context] new version - support for Win64
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2011-01-15 10:33:16

Am 15.01.2011 16:03, schrieb vicente.botet:
>> The function pointer is not a callback it is the function executed in
>> the context and the void ptr is its argument.
>> If you require to use boost.function you could easily create an object
>> containing a boost::context and your boost:function instance. The
>> context executes a trampoline function which will be invoked with the
>> pointer to this object as argument. For more details look into boost.fiber.
> Could you add an example using something else than a void(*)(void*) entry?


struct X
   boost::context ctx;
   void execute();

void trampoline( void * vp)
   X * x = static_cast< X * >( vp);

X::X() :
   ctx( boost::context::create( trampoline, this) )


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