Carbon


ThreadTaskRef

Header: Threads.h

typedef void ThreadTaskRef;

In certain cases, such as during execution of an interrupt function, your application is not guaranteed to be the current process. Since threads are defined within an application context, it follows that in cases such as these, you cannot get or set information about any particular threads in your application unless you have a way of identifying the application context. The thread task reference gives you a way of doing this.

You can obtain the thread task reference by calling GetThreadCurrentTaskRef at a time when you know your application is the current context. Later, during execution of an interrupt function, you can use the thread task reference to identify your application. For example, you can pass the thread task reference to functions such as GetThreadStateGivenTaskRef and SetThreadReadyGivenTaskRef in an interrupt function to get and set information about the state of particular threads in your application.

The ThreadTaskRef data type defines the thread task reference.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)