34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*!
* @brief A class which provides portable threads.
*
* To use it, you should create a new class derived from it and reimplement
* main.
*
* @warning Even though the OFCopying protocol is implemented, it does
* <i>not</i> return an independent copy of the thread, but instead
* retains it. This is so that the thread can be used as a key for a
* dictionary, so context can be associated with a thread.
*/
@interface OFThread: OFObject <OFCopying>
{
#ifdef OF_THREAD_M
@public
#else
@private
|
|
|
|
|
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*!
* @brief A class which provides portable threads.
*
* To use it, you should create a new class derived from it and reimplement
* main.
*
* @warning Even though the OFCopying protocol is implemented, it does *not*
* return an independent copy of the thread, but instead retains it.
* This is so that the thread can be used as a key for a dictionary,
* so context can be associated with a thread.
*/
@interface OFThread: OFObject <OFCopying>
{
#ifdef OF_THREAD_M
@public
#else
@private
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
*/
+ (void)setObject: (id)object
forTLSKey: (OFTLSKey*)key;
/*!
* @brief Returns the object for the specified Thread Local Storage key.
*
* The returned object is <i>not</i> retained and autoreleased for performance
* reasons!
*
* @param key The Thread Local Storage key
*/
+ (id)objectForTLSKey: (OFTLSKey*)key;
/*!
* @brief Returns the current thread.
|
|
|
|
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
*/
+ (void)setObject: (id)object
forTLSKey: (OFTLSKey*)key;
/*!
* @brief Returns the object for the specified Thread Local Storage key.
*
* @warning The returned object is *not* retained and autoreleased for
* performance reasons!
*
* @param key The Thread Local Storage key
*/
+ (id)objectForTLSKey: (OFTLSKey*)key;
/*!
* @brief Returns the current thread.
|