Re: Idle Time in a loop
Re: Idle Time in a loop
- Subject: Re: Idle Time in a loop
- From: Judi Smith <email@hidden>
- Date: Sun, 17 Feb 2002 18:35:38 -0600
Sherm:
I appreciate that. I did think about threads. However, it seems to me
that to detach a new thread I need an object as a target. The while loop
is actually a QT sequence grabber (calling SGIdle) and all of this
legacy c code is not lending itself to making it into an object.
Is there another option? I see something about timers, but I can't
figure out how to use a timer to give the event loop time to run other
events.
Regards
Judi
On Sunday, February 17, 2002, at 04:51 PM, Sherm Pendley wrote:
You could launch the task in a separate thread (NSThread), and
communicate with it using notifications (NSNotification) or DO
(NSDistantObject).
You only need to do this to avoid blocking your own application's local
event loop, by the way. A long-running routine in your application
won't block the system-wide event loop; pre-emptive multitasking
prevents that.
sherm--
On Sunday, February 17, 2002, at 04:30 PM, Judi Smith wrote:
Hello all:
There is probably an easy answer to this, but...
I have a while loop that is performing a task. How do I allow for time
for, or transfer control to the event loop to process pending events
in the course of the while loop?
TIA
Judi Smith
_____________________________________________________
Judi Smith Awana Clubs International
Multimedia Maven 1 E Bode Rd.
Ph: 630-540-4570 Streamwood, IL 60107
Fx: 630-213-2640
http://www.awana.org
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.