Re: Sleep?
Re: Sleep?
- Subject: Re: Sleep?
- From: John Stiles <email@hidden>
- Date: Wed, 09 Nov 2005 10:55:08 -0800
Christian Weykopf wrote:
Am 09.11.2005 um 17:56 schrieb j o a r:
On 9 nov 2005, at 17.53, Brian O'Brien wrote:
I am trying to get a thread class debugged and I am trying to
simulate a
thread routine that takes a few seconds to complete and then
finishes...
OK. Well, besides what John mentioned, there is also "+[NSThread
sleepUntilDate:]".
Correct me if I'm wrong.
AFAIK lead this routines to a thread switching. Not the right way to
simulate some load.
True, it will block your thread and the scheduler will schedule in some
other thread.
To be fair, this will probably happen either way; if you do work for
more than a very very small increment of time, the scheduler will block
you and swap in another thread anyway.
For a more realistic test, you could drop in a loop that calls busy-work
math functions or something (e.g. calculate the sine of every integer
from 1 to 1000000).
_______________________________________________
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
References: | |
| >Sleep? (From: "Brian O'Brien" <email@hidden>) |
| >Re: Sleep? (From: j o a r <email@hidden>) |
| >Re: Sleep? (From: "Brian O'Brien" <email@hidden>) |
| >Re: Sleep? (From: j o a r <email@hidden>) |
| >Re: Sleep? (From: Christian Weykopf <email@hidden>) |