Processing messages is too slow, resulting in a jerky, unresponsive UI - how can I use multiple threads to alleviate this?

前端 未结 3 1942
日久生厌
日久生厌 2021-01-06 16:49

I\'m having trouble keeping my app responsive to user actions. Therefore, I\'d like to split message processing between multiple threads.

Can I simply create severa

3条回答
  •  攒了一身酷
    2021-01-06 17:39

    You cannot have more than one thread which interacts with the message pump or any UI elements. That way lies madness.

    If there are long processing tasks which can be farmed out to worker threads, you can do it that way, but you'll have to use another thread-safe queue to manage them.

提交回复
热议问题