iphone singleton object synchronization
Posted
by user127091
on Stack Overflow
See other posts from Stack Overflow
or by user127091
Published on 2010-05-21T12:22:37Z
Indexed on
2010/05/21
12:30 UTC
Read the original article
Hit count: 216
I'm working on an iphone app but this is probably a general question.
I have a singleton Model class and there would be scenarios where multiple NSOperations (threads) would exist and work with the singleton object. If they all call the same method in this object, do i need to have some locking mechanism?
Or can this method be executed only one at a time?
I do not have a computer science background but my guess is that all threads would have their CALL to the same address (this method). Also can you please suggest a good beginner programming book that discusses general programming concepts. I don't have the brains for Knuth kinda books.
© Stack Overflow or respective owner