You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2006/11/29 15:39:49 UTC

C++ commit: EventChannel

This is the Posix epoll implementation of the event channel design for
asynch IO. Note the posix broker is not yet working so the build still
defaults to APR. I'll merge the posix broker later today or tomorrow and
switch the build to default to Posix.

Cheers,
Alan.


Re: C++ commit: EventChannel

Posted by Alan Conway <ac...@redhat.com>.
On Sun, 2006-12-03 at 21:21 -0500, Carl Trieloff wrote:
> John O'Hara wrote:
> > I love the use of ucontext_swap.
> >
> > When was that invented?  Is it Linux only?
> >

My typo. It's swapcontext and friends, which manipulate a ucontext_t.
It's POSIX, not just Linux but I don't know what other OS's support it.

http://www.opengroup.org/onlinepubs/007908799/xsh/makecontext.html 

Cheers,
Alan.


Re: C++ commit: EventChannel

Posted by Andrew Stitcher <as...@redhat.com>.
I have the horrible feeling I'm just about to say something very stupid, 
but here goes anyway...

I can't find any google reference to "ucontext_swap" (except the design 
on the qpid wiki - which makes this a bizarre googlewhack). Are we 
talking about using ucontext_t and swapcontext etc?
or is ucontext_swap something that google doesn't know about?!

If so then these are standard Single Unix Spec APIs. around for quite a 
while on Unix, but only much more recently implemented on Linux. Windows 
has an equivalent in "fibres" (get it threads - fibres)

Andrew

Carl Trieloff wrote:
> John O'Hara wrote:
>> I love the use of ucontext_swap.
>>
>> When was that invented?  Is it Linux only?
>>
>
> Unfortunately yes, well there is something more privative in bsd i 
> believe. So other platforms have
> to do user-space scheduling and don't have the real-time setpoints. 
> Thus the two IO modules, APR
> and posix.
>
> Carl.


Re: C++ commit: EventChannel

Posted by John O'Hara <jo...@gmail.com>.
I stand corrected.

On 04/12/06, Steven Shaw <st...@gmail.com> wrote:
>
> On 04/12/06, Carl Trieloff <cc...@redhat.com> wrote:
> > Unfortunately yes, well there is something more privative in bsd i
> > believe. So other platforms have
> > to do user-space scheduling and don't have the real-time setpoints. Thus
> > the two IO modules, APR
> > and posix.
>
> Coroutines is what you are after. See Steve Dekorte's portable
> coroutine library:
>
>   http://www.dekorte.com/projects/opensource/libCoroutine/
>
> n.b. Coroutines aren't continuations.
>
> Cheers,
> Steve.
>

Re: C++ commit: EventChannel

Posted by Alan Conway <ac...@redhat.com>.
On Mon, 2006-12-04 at 02:35 +0000, Steven Shaw wrote:
> Coroutines is what you are after. See Steve Dekorte's portable
> coroutine library:
> 
>   http://www.dekorte.com/projects/opensource/libCoroutine/
> 
Thanks, I'll take a look.



Re: C++ commit: EventChannel

Posted by Steven Shaw <st...@gmail.com>.
On 04/12/06, Carl Trieloff <cc...@redhat.com> wrote:
> Unfortunately yes, well there is something more privative in bsd i
> believe. So other platforms have
> to do user-space scheduling and don't have the real-time setpoints. Thus
> the two IO modules, APR
> and posix.

Coroutines is what you are after. See Steve Dekorte's portable
coroutine library:

  http://www.dekorte.com/projects/opensource/libCoroutine/

n.b. Coroutines aren't continuations.

Cheers,
Steve.

Re: C++ commit: EventChannel

Posted by Carl Trieloff <cc...@redhat.com>.
John O'Hara wrote:
> I love the use of ucontext_swap.
>
> When was that invented?  Is it Linux only?
>

Unfortunately yes, well there is something more privative in bsd i 
believe. So other platforms have
to do user-space scheduling and don't have the real-time setpoints. Thus 
the two IO modules, APR
and posix.

Carl.

Re: C++ commit: EventChannel

Posted by John O'Hara <jo...@gmail.com>.
I love the use of ucontext_swap.

When was that invented?  Is it Linux only?

It's awesome; threading like I always wanted it.  Easy to build state
machines.
Who needs Python for continuations now :-)

Very excited to see how this works out.
John

On 29/11/06, Alan Conway <ac...@redhat.com> wrote:
>
> This is the Posix epoll implementation of the event channel design for
> asynch IO. Note the posix broker is not yet working so the build still
> defaults to APR. I'll merge the posix broker later today or tomorrow and
> switch the build to default to Posix.
>
> Cheers,
> Alan.
>
>