thread and run loop
thread and run loop
- Subject: thread and run loop
- From: Olivier Destrebecq <email@hidden>
- Date: Mon, 31 Oct 2005 19:27:19 -0500
In my saving method for my document, i decided to offload all the
work to a thread so that the progress dialog that is displayed gets
updated.
Here is what i do to achieve this
start secondary thread
while (!doneSaving)
[[NSRunLoop currentRunLoop] runUntilDate: [NSDate
dateWithTimeIntervalSinceNow: 0.1]];
and then resume work and return. It seems to work, but i'm not sure
this is the way to do it...
is this the correct approach, should i use -run instead of -
rununtildate on the runloop?
Olivier
http://otusweb.spymac.com/home/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden