Boost logo

Boost :

Subject: Re: [boost] Futures
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-01-15 08:33:44

On 14 Jan 2015 at 15:48, Rob Stewart wrote:

> On January 14, 2015 7:20:43 AM EST, Niall Douglas <s_sourceforge_at_[hidden]> wrote:
> > On 13 Jan 2015 at 16:52, Thomas Heller wrote:
> >
> > > > We keep trivialising C compatibility, and we should not.
> > >
> > > No one is trivialising C compatibility. You can call any C code from
> > C++.
> >
> > I think I was clear that I meant the other way round. C code needing
> > to compose waiting on C++ code to do something with other operations
> > is a major pain. Ask anyone working in the Python C runtime and
> > trying to work with C++ code.
> FWIW, that wasn't clear to me before now.

Oh. Okay. Sorry then.

To be honest, C code only needs the ability to compose waits, that's
the frustrating part because C++ is all up itself with no regard to
others. For example, if a promise-future could toggle the signalled
state of a file descriptor, that would enable C code to run a
select() composure where the C code waits on "something to happen",
which includes a C++ future becoming set.

FYI the pthreads permit object I wrote has the optional facility to
signal a fd when it goes signalled, so a permit object based future
would be very useful to C code.


ned Productions Limited Consulting

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