Synchronization/wait design for cross-thread event signaling (Obj-C)?
问题 In a Cocoa app, I have a setup like this: The main thread (M) can submit requests to a some background "producer" thread (B) to get some work done, say the result of a computation on item X. A different background thread (C) shortly thereafter might want the results of computing item X, and want those results synchronously. Thread C could just re-do the work synchronously itself, but if thread B happens to be in the middle of computing item X already, I would like thread C to block and get