On Oct 6, 2016, at 13:26 , Jens Alfke <j...@mooseyard.com> wrote:
> 
> Maybe someone’s come up with a generic proxy class that can be used to 
> dispatch the notifications to the main thread?

Well, Apple has. NSProgress is a multi-purpose class, one of whose purposes is 
to provide a thread-safe way of trampolining the progress completion reports 
from a background worker thread to properties that may be safely accessed from 
the main thread.

However, there’s a bit of a learning curve associated with NSProgress, since it 
does other stuff that may or may not be useful here. Also, some additional 
coding may be needed to rewire the properties that the UI bindings actually 
use, to match to the NSProgress API. For that reason, it may be simpler (in 
this case) just to dispatch to the main thread and keep the rest of existing 
code structure.

I remember you had an excursion into the weird world of NSProgress, maybe 2-3 
years ago, because you posted about it here. It’s only fairly recently that 
I’ve started using NSProgress too.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to