Keeping GUIs responsive during long-running tasks

前端 未结 9 2108
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-14 22:28

Keeping the GUI responsive while the application does some CPU-heavy processing is one of the challenges of effective GUI programming.

Here\'s a good discussion of h

9条回答
  •  盖世英雄少女心
    2020-12-14 23:09

    Threads or processes depending on the application. Sometimes it's actually best to have the GUI be it's own program and just send asynchronous calls to other programs when it has work to do. You'll still end up having multiple threads in the GUI to monitor for results, but it can simplify things if the work being done is complex and not directly connected to the GUI.

提交回复
热议问题