Boost logo

Boost :

Subject: Re: [boost] [context] new version - support for Win64
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2011-01-15 15:17:57

----- Original Message -----
From: "Oliver Kowalke" <k-oli_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, January 15, 2011 8:38 PM
Subject: Re: [boost] [context] new version - support for Win64

> Am 15.01.2011 19:02, schrieb vicente.botet:
>> * The sentence in the Overview "(threads are preemptively scheduled)" could be misleading as the code will in any case be run on a thread.
> threads are scheduled by the operating system - the scheduling is
> pre-emptive - the code can be suspended at (almost) any time. The
> sentence should express the difference to
> userland-threads/fibers/lightweight-threads (etc.) where each context
> decides when it get suspended(cooperative scheduling). off curse the
> context is running in one thread it will be pre-emptively suspended by
> the os scheduler.

I understand. I was just only telling that the sentence was misleading and maybe you can change it.
>> * How is this related to setjmp/longjmp?
> ::longjmp() is not required to preserve the stack frame - so jumping
> back to a function which was exited via ::longjump() is undefined

Maybe it is worh to add something in the documentation explaining the advantages.

>> * How exceptions are propagated when calling to jump_to()?
> context::jump_to() doesn't throw. as noted in the docu the code jumped
> into via context::jump_to() must not throw

I don't see it on the reference part. Could you point me where it is documented?

So if exceptions can not be propagated between contexts, how the user does with exceptions?
>> * Why do you need a ::create function?
> to have a named ctor - default ctor creates an 'not_a_context'. This is
> required by the move semantics

This don't answer my question. Why you don't provide a constructor with the same parameters ::create has?
>> * Could you clarify your sentence "Frame-unwind-tables instead of setjmp/longjmp based exception handling must be used in order to catch exception inside called function."
> for instance gcc supports both strategies how exceptions are
> modelled/propagated. calling ::longjmp() is equivalent to throw
> statement. Functions written in C++ will have unwind information by default.

And how this translates to the user? Do the user needs to do someting specific?

>> * Performances comparison between fiber and fcontext will be welcome
> do refer to boost.fiber? boost.fiber uses boost.context internally.
> fcontext is an implementation detail of boost.context.
> I don't understand the need for comparing it.

No I mean comparaison between yous specific implementation with assembler and the use of Windows Fibers to implement Boost.Context. That is the same kind of comparison you did for UNIX.

Sorry if I was not enough clear.

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