|
Boost : |
Subject: Re: [boost] [context][fiber] implementation comments
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2011-03-01 14:41:08
Am 01.03.2011 16:45, schrieb Charlls Quarra:
> this applies here too; can you make the fiber take template parameters for the stack type and possibly use an allocator parameter to delegate all new/delete operations? currently fiber is couple to boost::context::protected_stack
>
Hello Charlls,
the use of boost::protected_stack inside boost::fiber is intended
because if the stack is exceeded and context writes to memory not
belonging to the stack then in best case you get an segmentation
fault/access violation (if the memory does not belong to the process) or
you write to memory of your application which result is unexpected
behaviour of your app. Therefore protected_stack is used generating
alsways and segmentation fault if sthe stack is exceeded.
If you have other requirements you could use boost.context to create
your own abstraction - that's the reason why I've move the context
abstraction in a separate library.
Oliver
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk