Nyaruko
Nyaruko

Reputation: 4459

Is Qt's connect call itself thread safe?

I know you can connect signal slot that lives in different thread (has different thread affinity.) But is the connect call it self thread safe?

Say if I want to call:

connect(mainObject,SIGNAL(...),this,SLOT());

in two different thread?

Upvotes: 1

Views: 70

Answers (1)

NathanOliver
NathanOliver

Reputation: 180415

If you look at the documentation here: http://doc.qt.io/qt-5/qobject.html#connect at the end there is the note

Note: This function is thread-safe.

Upvotes: 4

Related Questions