c++ - QT Is a slot launched in a separate thread -
i have done research on topic . thread @ caught interest , wanted summarize understanding , corrected if going wrong on path , wanted know how queuedconnection work.
here understanding followed question. signals can connected manually slots through 2 different ways first way using direct connection , second way queued connection. in case of direct connection if slot method attached signal in same thread slot method called sequentially (as if method) incase slot in different thread signal launched queuedconnection launch when finds appropriate. (now in case not sure if launch new thread or how proceed on doing that)
slots don't belong particular thread, plain functions. objects do. if connect signal slot queuedconnection
, signal emission create event , send event queue of target. qt arrange slot called when internally processing event.
as events, processed in thread of object's thread affinity. can change thread calling movetothread
on target object.
Comments
Post a Comment