Re: dispatch_sync() lockup workaround

2010-10-20 Thread Thomas Clément
On 20 oct. 2010, at 03:15, Abhi Beckert wrote: > According to the documentation dispatch_sync(dispatch_get_main_queue(), ^{ > ... }) will lockup if you are already on the main queue. Best is to use dispatch_async() instead. Thomas___ Cocoa-dev maili

Re: dispatch_sync() lockup workaround

2010-10-19 Thread Charles Srstka
On Oct 19, 2010, at 8:15 PM, Abhi Beckert wrote: > Hi, > > According to the documentation dispatch_sync(dispatch_get_main_queue(), ^{ > ... }) will lockup if you are already on the main queue. > > I have several methods which can be called from either a background queue or > the main queue, bu

dispatch_sync() lockup workaround

2010-10-19 Thread Abhi Beckert
Hi, According to the documentation dispatch_sync(dispatch_get_main_queue(), ^{ ... }) will lockup if you are already on the main queue. I have several methods which can be called from either a background queue or the main queue, but parts of them *must* be run on the main queue. What is a clea