Oh, Yes, I have overlooked that ControlObject::initialize() sets up a
direct connection.


2013/5/23 RJ Ryan <notifications@github.com>

> In mixxx/src/playermanager.cpp:
>
> > @@ -46,6 +50,17 @@
> >              this, SLOT(slotNumPreviewDecksControlChanged(double)),
> >              Qt::DirectConnection);
> >
> > +    // Make sure the number of internal decks is in sync with the number of decks in the skin.
> > +    connect(m_pCOSkinNumDecks, SIGNAL(valueChanged(double)),
> > +            this, SLOT(slotNumDecksControlChanged(double)),
> > +            Qt::DirectConnection);
>
> Not sure what you mean by double signal? If you are referring to the chain
> of signals from ControlObject::set() -> ControlDoublePrivate::set() ->
> ControlDoublePrivate::valueChanged() ->
> ControlObject::privateValueChanged() ->
> ControlObject::valueChanged/valueChangedFromEngine then I think you are
> missing that the ControlNumericPrivate / ControlObject connection is also a
> direct connection (and must be -- otherwise Qt will take unintended
> roundtrips through the event queue if the current thread when set() is
> called does not match the thread property of the object attached to the
> signal).
>
> Qt signals and slots do not care about the emitter of the signal at all,
> all they care about is the current thread when emit() is called. If the
> current thread when emit is called does not match the receiving objects
> 'thread' property then AutoConnection is queued, otherwise it is a
> DirectConnection.
>
> isn't the PlayerManager and the LegacySkin parser in the same thread anyway
>
> PlayerManager is thread safe and its methods are invoked by multiple
> threads in addition to the main thread. LegacySkinParser is totally in the
> main thread.
>
> For example, MIDI controllers can (and do) set the number of decks. Then
> the valueChanged signal would come from the controller thread.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mixxxdj/mixxx/pull/6/files#r4351458>
> .
>