Re: prioritizing threads
Re: prioritizing threads
On Tue, Dec 28, 2004 at 11:04:43PM +0000, Tim Hewett wrote:
> To actually control proportions of thread CPU usage accurately
> you'll be best off using real time threads. This seems to be quite
[...]
> Get the current Firewire SDK from developer.apple.com. Look
> for a function called setThreadPriority() in a file called DVLib.c.
> See if you can understand how it works... then please tell me :-)
Humorously, this example code uses nearly the same black magic that one of my test cases has, just with different parameters I also don't understand that basically make the current thread so important that if it is computation only (no function calls) then it never relinquishes control.
Perhaps I need to ask a more general question: Why does a thread that is blocking on an NSLock or sleep() ing get ANY time? Is Sampler.app lying? It seems there should be a way to say "please don't schedule this thread at all for the next second of actual time, or better yet, until this lock is released (which another thread owns and thus we cannot possibly release it!".
_______________________________________________
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