thread_policy_set
thread_policy_set
- Subject: thread_policy_set
- From: "Jeremy Todd" <email@hidden>
- Date: Tue, 18 Sep 2007 14:07:33 -0400
Hi there,
I'm a bit confused about one aspect of the thread precedence scheduling
policy. My understanding was that calling thread_policy_set with
THREAD_PRECEDENCE_POLICY would let me set an importance for a thread
relative to other threads in my process.
I have an application with the main thread, thread A and thread B. If thread
A has a lot of work to do, I'd like it to take precedence over thread B. I
tried passing an importance of -1 for thread B, while keeping thread A set
to the default value of zero. This didn't have much effect. If I pass -20
for thread B's importance, however, then the app behaves as desired.
Can anyone tell me the meaning of the THREAD_PRECEDENCE_POLICY "importance"
value? I had understood that it was only interpreted relative to other
threads in my process, but now I think it might be mapped to some scale
where its value has meaning, in which case I'll need some basis for deciding
what value to use in my application.
Regards,
Jeremy Todd
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden