C++ Logo


Advanced search

Re: Signals & Slots

From: René Ferdinand Rivera Morell <grafikrobot_at_[hidden]>
Date: Fri, 23 Jul 2021 10:50:11 -0500
On Fri, Jul 23, 2021 at 10:33 AM Matthew Woehlke <mwoehlke.floss_at_[hidden]>

> On 7/23/21 11:20 AM, René Ferdinand Rivera Morell wrote:
> > On Fri, Jul 23, 2021 at 8:28 AM Matthew Woehlke wrote:
> >> Needing connections that are guaranteed synchronous is less common
> >> than not caring.
> >
> > In my experience synchronous signals are the most common use case in GUI
> > programming.
> Sure, in Qt, most slots *are* executed synchronous. I don't believe it's
> the case however that most slots would work incorrectly if they
> *weren't* dispatched synchronously. That's sort of the whole concept
> behind event-driven programming.

In the type of GUI programming I mostly do, interactive games, the decision
to do synchronous (signals) vs asynchronous (events) N:M calls is
deliberate and consequential. And one is commonly written in terms of the
other. And sometimes the asynchronous dispatching (events) has variations
on how and when they happen with tight control to maintain interactive
rendering rates. Which shows that the synchronous and asynchronous aspects
are orthogonal. And probably should be two independently interoperable
components. Like much of the standard library design.

-- René Ferdinand Rivera Morell
-- Don't Assume Anything  -- No Supone Nada
-- Robot Dreams - http://robot-dreams.net

Received on 2021-07-23 10:50:26