Boost logo

Boost Users :

Subject: Re: [Boost-users] boost coroutine status
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-04-30 17:22:02


OvermindDL1 wrote:
> On Thu, Apr 30, 2009 at 8:56 AM, Nat Goodspeed <nat_at_[hidden]>
> wrote:
>> Nat Goodspeed wrote:
>>
>>> Robert Ramey wrote:
>>>
>>>> Any chance the package in the vault could be updated with these
>>>> patches?. Would it be possible to include the html version of the
>>>> documentation in the package in the vault as well?
>>
>> Let's try that again:
>> http://www.boostpro.com/vault/index.php?action=downloadfile&filename=boost-coroutine-2009-04-30.tar.gz&directory=Concurrent%20Programming&
>>
>> As soon as I #included coroutine headers in a second .cpp file on
>> Windows, I ended up with duplicate-symbol link errors. Maybe
>> Giovanni Deretta hadn't gotten beyond single-source test programs.
>> Fortunately the fix was straightforward.
>
>
> I looked at this library a few years ago before I wrote my own (for a
> windows system), and the big problem I saw with it was that it uses
> fibers on windows. Fibers have this little problem, if you say you
> need, say, 20kb for the fiber stack, it still allocates as much memory
> as a thread uses (4megs by default I think), meaning if you try to
> create 10k of these little buggers, you run out of memory well before
> that. Made this library rather worthless for my use. If it really
> wants to be used for a good coroutine based paradigm, then they need
> to get rid of the fiber usage on the win32 side.

I have also got the package running on my Windows/XP system. Here
is a summary of my experience and impressions.

a) Overall, this is a very good start. Good tutorial, lots of examples
and tests. It worked in my environment without problem.
b) I was unsuccessful in getting bjam to build the package or its
documentation.
I would expect that a boost.build guru could fix that up in short order.
When
I looked into this, I found that there was only one compiled module. I made
a tweak so that this was implemente in a header so the boost build problem
went away for me - at least for the library build. I would expect that a
similar
tweak could be done for other platforms thus making it a header only
library.

This package isn't quite ready for boost, but it's way too good not to
finish.

Here is what is needed.
a) Needs reference documentation.
b) Formal review

Here is a set of enhancements which would be welcome:
a) implemention of the coroutine switch for other platforms. Currenlty
linux and windows are implemented.
b) a possible alternative implemenation of coroutine switch for
windows which doesn't depend on fibers. I have one that I've used
for many years. Of course it's in assembler. I'm sure this is doable.
c) I would like to see the lower level implemenation selectable at
compile time between different implementations - including one
based on threads so that one would have the same interface
for a multi-threading/multicore environment.

Of course this would need someone commited to do all this. But
there would be a lot of glory for this since the package described
above would be a boost "best seller".

Robert Ramey


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net