NSThread with _NSAutoreleaseNoPool error

前端 未结 5 725
独厮守ぢ
独厮守ぢ 2021-02-04 09:38

I have an method which save files to the internet, it works but just slow. Then I\'d like to make the user interface more smooth, so I create an NSThread to handle the slow task

5条回答
  •  半阙折子戏
    2021-02-04 10:16

    I don't see any reason for you to use threads for this. Simply doing it asynchronously on the run loop should work without blocking the UI.

    Trust in the run loop. It's always easier than threading, and is designed to provide the same result (a never-blocked UI).

提交回复
热议问题