What is the use of synchronized() block in objective c?



What is the use of synchronized() block in objective c?..

Answer / Sanjay Kumar Choudhary

The synchronized() block in Objective-C provides a way to enforce mutually exclusive access to shared resources, preventing multiple threads from accessing these resources simultaneously. This helps to maintain data consistency and avoid race conditions.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Objective-C Interview Questions

What do you mean by synthesized in objective-c?

1 Answers  


Is a fact objective?

1 Answers  


What is nsarray objective c?

1 Answers  


What is protocol with example?

1 Answers  


Explain class definition in objective-c?

1 Answers  


When is toll-free bridging useful?

1 Answers  


What is an accessor method?

1 Answers  


What is super in objective c?

1 Answers  


How to make a code snippet thread safe?

1 Answers  


What are static attributes?

1 Answers  


What is extern objective c?

1 Answers  


What is property classification?

1 Answers  


Categories