Rajeev Prajapati
What is atomic and nonatomic in iOS operating system? What is run loop in iOS ?
  • Tripat Bala Singh
    Mar, 2018 28

    Atomic:- is the default behavior. it will ensure the present process is completed by the CPU, before another process accesses the variable.it is not fast, as it ensures the process is completed entirelyNon-Atomic: - is NOT the default behavior. Non-Atomic faster (for synthesized code, that is, for variables created using @property and @synthesize). Non-Atomic not thread-safe. Non-Atomic may result in unexpected behavior, when two different process access the same variable at the same timeRun loop in iOS:- Run loop are part of the basic infrastructure associated with threads. A Run loop is a event processing loop that you use to schedule work and communicate the incoming events. If there is no work to do thread goes to sleep. Run loop management is not automatic you have to write your own thread code to start the run loop at proper time and response to incoming events. Cocoa and Core Foundation provides run loop objects to configure and manage thread 's run loop. Application does not need to create run loop objects application main thread and other thread has associated run loop object.The application framework automatically set up and run the run loop on the main thread at startup process.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS