C++ Logo

std-proposals

Advanced search

Re: Signals & Slots

From: Phil Bouchard <boost_at_[hidden]>
Date: Thu, 22 Jul 2021 16:14:51 -0400
On 7/22/21 2:32 PM, Tony V E via Std-Proposals wrote:
>
>
> On Thu, Jul 22, 2021 at 2:28 PM Thiago Macieira via Std-Proposals
> <std-proposals_at_[hidden]
> <mailto:std-proposals_at_[hidden]>> wrote:
>
> On Thursday, 22 July 2021 11:17:11 PDT Tony V E via Std-Proposals
> wrote:
> > Signals-slots are fundamentally difficult/impossible without a
> central
> > message pump (like Qt has), or maybe executors.
>
> The cross-thread slot-delivery of a signal emission, agreed.
>
> For immediate execution, no, you don't need a message pump. At
> that point, the
> signal-slot mechanism is basically an M:N callback mechanism. We
> could have
> this portion first.
>
>
> You can do that, but it is not thread safe. Maybe worth
> standardizing, maybe not.


I would say it's worth it because you can:

- easily implement a state machine function using sync / async signals;

- some UI library could finally take advantage of such mechanism and
possible path to standardize a UI eventually.


> --
>
> *Phil Bouchard*
> Founder & CTO
> C.: (819) 328-4743
>
> Fornux Logo <http://www.fornux.com>

Received on 2021-07-22 15:14:56