> But Mike is still right; you're probably better served by using 
> -performSelectorOnMainThread::: rather than waking the run loop up yourself.

I tend to disagree -- invoking CFRunLoopPerformBlock() and
CFRunLoopWakeUp() is likely more performant since they're at the CF
level (which -performSelectorOnMainThread eventually calls into), and
a block-based API is more convenient. Furthermore,
-performSelectorOnMainThread: wakes up the target run loop anyway by
invoking CFRunLoopWakeUp().

> Given that it's a private mode, I'm not sure you really want your code 
> executing during the scroll event coalescing mode.

Agreed -- I wasn't using nor advocating NSScrollEventCoallescing.
(Also note that calling CFRunLoopWakeUp() on the main thread while
it's running in the NSScrollEventCoallescing mode won't cause it to
execute the block passed to CFRunLoopPerformBlock(...,
kCFRunLoopDefaultMode, ...) until the run loop is again running in the
default mode.)
_______________________________________________

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