Boost logo

Boost :

Subject: Re: [boost] [ANN] Boost.UI - a new C++ GUI library
From: Nat Goodspeed (nat_at_[hidden])
Date: 2017-09-29 17:51:10

On Thu, Sep 28, 2017 at 6:06 PM, Niall Douglas via Boost
<boost_at_[hidden]> wrote:

> - Don't implement a main loop, implement a function e.g. run() which
> dispatches exactly one pending event, returning true if there was an
> event processed.
> - Said run() also comes in run_until(deadline) form, where deadline can
> be "now" i.e. poll for an event, if one present dispatch it, else return
> immediately.
> - A post() routine lets any thread cause some user supplied callable to
> be executed in the run().

Yup, that's pretty much the subset of the io_service API I had in mind.

> The point is to open up your event dispatch so it can coexist with
> whatever existing system the user is already using.

Yes. Many applications and even frameworks want to own the main loop.
By default, Asio is one of them. Fortunately it does have these
integration-friendly alternatives.

Since you propose a Boost library, it would be a valuable exercise to
consider how best to integrate your framework with Asio -- especially
considering that something very like Asio is well on its way to
becoming part of the C++ Standard.

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