Re: Updating progress of UIProgressView. And Getting Better Saving Performance
Re: Updating progress of UIProgressView. And Getting Better Saving Performance
- Subject: Re: Updating progress of UIProgressView. And Getting Better Saving Performance
- From: Conrad Shultz <email@hidden>
- Date: Mon, 06 Dec 2010 18:30:29 -0800
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/6/10 6:21 PM, Laurent Daudelin wrote:
>> dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,
>> 0), ^{ // code you want implemented on another thread goes here:
>>
>> dispatch_async(dispatch_get_main_queue(), ^{ // code executed on
>> main thread goes here (i.e., updating the progress indicator in
>> your case
>>
>> }); });
>>
>> HTH, Dave
>
> Maybe I'm missing something but aren't the UI actions supposed to
> happen in the main thread, in this case, he should really call
> "performSelectorOnMainThread:withObject:waitUntilDone:"?
dispatch_get_main_queue() returns the queue associated with the main
thread, so the UI actions are getting run on the main thread.
The lead reference on this
http://developer.apple.com/library/mac/#documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html
- --
Conrad Shultz
Synthetiq Solutions
www.synthetiqsolutions.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFM/ZxEaOlrz5+0JdURAljXAJ9imCcemOPowLrCSGbM4FgBm4p9TwCfVetA
zl2Dm8dNxLcI7+3nZ0SkbHc=
=R8Wk
-----END PGP SIGNATURE-----
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden