recent study ios development, encounter a problem, that is time-consuming if there are several consecutive tasks, task 1, task 2, task 3, I now have to deal with is open Task 1 start threads, then the task is a complete, open a thread starts Task 2, Task 2 is complete, open a thread starts Task 3. Another solution is to just open a thread, a thread in this play which once ran several tasks, that is, the thread has a message queue, constantly deal with all kinds of messages, and then half-way I can cancel the task. Which God gave me the big talk about how to deal with in the ios. thx!
Reply:
Why not NSOperationQueue. . . This is more suitable for the needs you have, you just need to execute just fine granularity is set to 1.
Reply:
Execution granularity is set to 1, the purpose is to let you load in there was a task execution completed in the next.
Reply:
Well, I went to try
No comments:
Post a Comment