On 16.03.12 20:29, Seth Willits wrote:
Can you dispatch_async(main_queue, ^{ if (did not start momentum) cleanUp(); }); to insert that after the next handling of the event loop which should either start the momentum cycle or not (if it isn't needed)? I don't know if that cycle is guaranteed to start on the next event loop cycle or not. Actually come to thinking of it, that dispatch probably gets executed at the end of the current event loop run anyway.
Starting immediately doesn't work because the momentum phase takes a little to get going. What I'm doing now is using -performSelector:withObject:afterDelay: with a delay of about 0.1 seconds. It's soon enough to work for my cleanup and late enough to ensure the momentum phase has started which takes about 0.04-0.05 seconds after the last regular phase event.
Perhaps there's a better time to do cleanup altogether?
I'm hoping there is one, I'm not happy with the way its working right now. Thanks anyway!
Regards Markus -- __________________________________________ Markus Spoettl _______________________________________________ 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