Subject: Re: [boost] [context] Implementation comments
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2011-01-20 14:38:23
Am 20.01.2011 08:23, schrieb vicente.botet:
>> Some additional points to your request for separating stack allocation from context creation: Windows Fiber API (which is used as an implementation detail on Windows) doesn't allow to pass an self-allocated stack to CreateFiber(). So this would break the interface of boost::context.
> I think the interface of boost::context must be independent of the implementation details of a specific platform if in this way the interface could allow a better implementation on most of the other platforms. Instead of reducing the interface we need to make it as open as we can.
> The library could provide some stack allocation mechanisms which will take care of whether the implementation is using the Windows Fiber API. A user should be able to define its own allocation stack mechanism and be as efficient as possible if s/he takes in account detail implementation information provided by Boost.Context through for example a macro, BOOST_CONTEXT_MANAGE_THE_STACK or somthing like that.
If the ctor of boost::context takes an allocator-like object to allocate
stack (how the space will be allocated can be specialized by the user) -
should the lib ignore the allocator if Windows Fibers are used internally?
What recommends the boost standard?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk