Re: Let the runloop process its queue during a long operation
Re: Let the runloop process its queue during a long operation
- Subject: Re: Let the runloop process its queue during a long operation
- From: eveningnick eveningnick <email@hidden>
- Date: Thu, 7 Oct 2010 11:42:05 +0400
2010/10/6 Dave Keck <email@hidden>:
>> Can i make a runloop run only one time through the queue, and then
>> return back to processing of that big file?
>
> See CFRunLoopRunInMode(), specifically the returnAfterSourceHandled argument.
>
But this is for Carbon application, isn't it? I have a cocoa one...
Does this call operate with the core foundation run loop, bypassing
cocoa's one?
And if it's allowed to use it in cocoa app, what should i specify as
the second parameter (timeInterval)? 0 doesn't seem to work at all
(the run lop is not relaunched at all), 1 sec gives big delays, if
nothing has been pressed - it seems that "sourceHandled" means "at
least one event in queue is handled, if the queue is empty - just wait
that timeinterval". But then, setting any interval>0, i force my
application to wait, instead of processing that big file.
Or maybe i'm understanding something wrong?
_______________________________________________
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