What happens to the thread affinity of a QObject created within a worker thread which then terminates?

后端 未结 6 774
庸人自扰
庸人自扰 2021-02-05 04:39

Let\'s say I call QtConcurrent::run() which runs a function in a worker thread, and in that function I dynamically allocate several QObjects (for later use). Since

6条回答
  •  故里飘歌
    2021-02-05 05:24

    Although the Qt docs don't appear to specify the behaviour you could find out by keeping track of what QObject::thread() returns before and after the thread finishes.

提交回复
热议问题