site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thread-index: Acf6HshU1XEi/CyCS4eix7ZFDwGEVw== 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jeremy Todd