Running a Cocoa GUI in a non-main thread

前端 未结 3 1358
谎友^
谎友^ 2020-12-19 05:13

I am having a gui/threading related problem in developing a cocoa user interface. The application is designed like this:

Main Thread (#1): parses arguments, loads pl

3条回答
  •  一生所求
    2020-12-19 05:34

    Don't. This approach will never work. Even if you fix your current problem (the window not drawing) you'll immediately run into another obscure, impossible-to-fix problem, and another, and another. Cocoa expects the GUI thread to be the main thread, end of story.

提交回复
热议问题