H
H
Helecta2014-12-02 12:45:19
Objective-C
Helecta, 2014-12-02 12:45:19

What is Run Loop?

Good afternoon! I'm trying to figure out Run Loop. Esteemed eppolovsky documentation, but something did not become clearer. Several questions arose:

  • Is Run Loop created by the system for each thread or only for the main one? And for the rest of the threads, we have to create ourselves?
  • Run Loop is used to handle events coming from other threads?
  • And the most basic question is when should you use ? Section in the documentation "When Would You Use a Run Loop?" seen and read. But I didn't quite understand. Can you give real examples?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Evseev, 2014-12-03
@IlyaEvseev

Assumptions based on common experience:
1) only for the main one,
2) for everyone, regardless of the source,
3) for interactive applications or services that are requested in the form of events.
Although Apple likes to do things its own way.
ps About runLoop and gcd - Google immediately finds: stackoverflow.com/questions/3445561/why-does-apple...
Isn't it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question