ObjFW  Diff

Differences From Artifact [b93a3d71df]:

To Artifact [0d2fba1b4a]:


59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

@public
	id retval;
#endif
}

/**
 * \param obj An object that is passed to the main method as a copy
 * \return A new, autoreleased thread
 */
+ threadWithObject: (id)obj;

/**
 * Sets the Thread Local Storage for the specified key.
 *







|







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73

@public
	id retval;
#endif
}

/**
 * \param obj An object that is passed to the main method as a copy or nil
 * \return A new, autoreleased thread
 */
+ threadWithObject: (id)obj;

/**
 * Sets the Thread Local Storage for the specified key.
 *
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
 * Returns the object for the specified Thread Local Storage key.
 *
 * \param key The Thread Local Storage key
 */
+ (id)objectForTLSKey: (OFTLSKey*)key;

/**
 * \param obj An object that is passed to the main method as a copy
 * \return An initialized OFThread.
 */
- initWithObject: (id)obj;

/**
 * The main routine of the thread. You need to reimplement this!
 *







|







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
 * Returns the object for the specified Thread Local Storage key.
 *
 * \param key The Thread Local Storage key
 */
+ (id)objectForTLSKey: (OFTLSKey*)key;

/**
 * \param obj An object that is passed to the main method as a copy or nil
 * \return An initialized OFThread.
 */
- initWithObject: (id)obj;

/**
 * The main routine of the thread. You need to reimplement this!
 *
107
108
109
110
111
112
113




























/**
 * Joins a thread.
 *
 * \return The object returned by the main method of the thread.
 */
- join;
@end



































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/**
 * Joins a thread.
 *
 * \return The object returned by the main method of the thread.
 */
- join;
@end

/**
 * A class for creating mutual exclusions.
 */
@interface OFMutex: OFObject
{
#ifndef _WIN32
	pthread_mutex_t mutex;
#else
	HANDLE mutex;
#endif
}

/**
 * \return A new, autoreleased mutex.
 */
+ mutex;

/**
 * Locks the mutex.
 */
- lock;

/**
 * Unlocks the mutex.
 */
- unlock;
@end