-
Notifications
You must be signed in to change notification settings - Fork 0
1.06
Explanation of the contents of a topic page @ Week 1 Topic 1
Objectives: Different to direct connections
Comment: Thread-safe object communication: queued connections
E: Objective or new topic name?
Comment: The important thing to learn is the "context" in which the slot is executed. The right word is thread affinity, i.e. to which thread an object belongs to. I'd like to avoid talking about thread affinity yet, so delayed creation with QMetaObject::invokeMethod(...slot...) use cases and deleteLater slot would be important to learn. In queued connections that signal parameters are always marshalled and written to the copy of the object. This is important to understand. For example signal(&MyType) cannot be connected in a queued way to a slot as copied a reference does not make sense. signal(const &MyType) on the other hand works as the object copy of the reference works as a const reference.
- What are Queued Connections?
- What can be accomplished trough Queued Connections?
- What is thread affinity?
- How connection type affects the thread affinity? (or perhaps affects the thread in which the object members are called)
- What is delayed object creation?
- What is deleteLater?
- How are Signal parameters handled in queued connections? (references actually copied)
- How do queued connections work? (QCoreApplication::postEvent)
Queued Connections
Connection types affecting Thread affinity
Delayed Object Creation