Should I make a single NSLock instance in the application delegate, to be used by all classes? Or is it advisable to have each class instantiate its own NSLock instance as needed?
Would the locking work in the second case, if I, for example, had access to a managed object context that is spread across two view controllers?
...
Hi there,
I have my main application delegate which contains a method that returns an object. This application delegate runs on the main thread.
I also have a NSOperation that gets run on a different thread. As well as wanting to be able to call my app delegate method on my main thread sometimes, I also need to call it from my NSOperat...
I am trying to debug multiple threads.
*** -[NSLock lock]: deadlock (<NSLock: 0xc388ab0> '(null)')
*** Break on _NSLockError() to debug.
How can I debug this?
...
I have recently, like a few people, discovered that [ALAssetsLibrary enumerateGroupsWithTypes] likes to run its blocks on another thread. What a shame that Apple didn't document that :-)
In my current circumstance I need to wait for the enumeration to complete, before the main thread returns any results. I clearly need some sort of thre...