Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is Atomic property in iPhone sdk?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 211
    Comment on it

    Atomic properties are thread safe.

    To understand atomic property it is important first to take a little focus on multi-thread programming. In multi-thread programming different threads can use same property so it is must to apply thread handling. With atomic property not more than one thread can use same property as 'atomic' applied.

    For example thread x is applying setter method on 'name' property and simultaneously thread y is applying getter method then until thread x changes name thread y can not access name. So it has to wait until thread x performing its task.

    By example we can understand that this behavior make it slow as other threads has to wait. As a solution 'non-atomic' properties are used, which are not thread safe so faster than atomic.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: