Skip navigation.
 
mlRe: Threading - How its done?
FROM : Chris Hanson
DATE : Thu May 08 07:32:26 2008

On May 6, 2008, at 6:32 PM, Karl von Moller wrote:

> With regard to Threading PDF's, while I didn't want to specifically 
> build for 10.5 only, using NSOperation's or using some sort of 
> priority queue process - does this offer any protection for 
> threading PDF activities? As yet I have not used NSOperations but 
> reading the docs this sounds like it could encapsulate much of the 
> Threading detail for me.


NSOperation encapsulates the work of managing a thread pool and work 
queue.

It does nothing to "protection" to any threading.  Multithreading 
means allowing multiple flows of control to take place in a single 
address space; if you want those different flows of control to 
manipulate the same data, you need to synchronize their access to it 
-- and you need to be certain you *can* synchronize their access to it.

The latter is why bindings don't just magically work with threads. 
They would have to have some way to lock the object graph they're 
reading from, and any code working with that object graph would also 
have to lock it.  And all locking would have to occur in the same 
order and without dependencies to prevent deadlock.

  -- Chris

Related mailsAuthorDate
mlRe: Threading - How its done? Army Research Lab May 6, 20:30
mlRe: Threading - How its done? glenn andreas May 6, 20:38
mlRe: Threading - How its done? Karl von Moller May 7, 01:51
mlRe: Threading - How its done? John Calhoun May 7, 02:43
mlRe: Threading - How its done? Karl von Moller May 7, 03:32
mlRe: Threading - How its done? Adam R. Maxwell May 7, 04:19
mlRe: Threading - How its done? Chris Hanson May 8, 07:32