Carbon


SchedulerInfoRec

Header: Threads.h

struct SchedulerInfoRec {
    UInt32 InfoRecSize; 
    ThreadID CurrentThreadID; 
    ThreadID SuggestedThreadID; 
    ThreadID InterruptedCoopThreadID;
};
typedef SchedulerInfoRec SchedulerInfoRecPtr;

Field descriptions

InfoRecSize

The size of the structure.

CurrentThreadID

The thread ID of the current thread.

SuggestedThreadID

The thread ID of the thread that the application has suggested to run.

InterruptedCoopThreadID

Historically, the thread ID of a preempted cooperative thread if a cooperative thread has been interrupted and has not yet resumed execution. Because it no longer supports preemptive threads, the Thread Manager always passes the constant kNoThreadID to indicate that there is no thread that has been interrupted.

You can, if you wish, use the SetThreadScheduler function to install a custom scheduling function to work in conjunction with the default Thread Manager scheduling mechanism. The Thread Manager uses the scheduler information structure to pass information to the custom scheduling function that allows it to decide which thread, if any, to schedule next.


© 2000 Apple Computer, Inc. — (Last Updated 3/8/2000)