ObjFW  Diff

Differences From Artifact [dbfdd8a5a4]:

To Artifact [c8632579ec]:


54
55
56
57
58
59
60

61
62
63
64
65
66
67
{
# ifdef OF_THREAD_M
@public
# else
@private
# endif
	of_thread_t _thread;

	enum {
		OF_THREAD_NOT_RUNNING,
		OF_THREAD_RUNNING,
		OF_THREAD_WAITING_FOR_JOIN
	} _running;
	void *_pool;
# ifdef OF_HAVE_BLOCKS







>







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
# ifdef OF_THREAD_M
@public
# else
@private
# endif
	of_thread_t _thread;
	of_thread_attr_t _attr;
	enum {
		OF_THREAD_NOT_RUNNING,
		OF_THREAD_RUNNING,
		OF_THREAD_WAITING_FOR_JOIN
	} _running;
	void *_pool;
# ifdef OF_HAVE_BLOCKS
75
76
77
78
79
80
81


82
83
84
85
86
87
88
}

# ifdef OF_HAVE_PROPERTIES
#  ifdef OF_HAVE_BLOCKS
@property (copy) of_thread_block_t threadBlock;
#  endif
@property (copy) OFString *name;


# endif

/*!
 * @brief Creates a new thread.
 *
 * @return A new, autoreleased thread
 */







>
>







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
}

# ifdef OF_HAVE_PROPERTIES
#  ifdef OF_HAVE_BLOCKS
@property (copy) of_thread_block_t threadBlock;
#  endif
@property (copy) OFString *name;
@property float priority;
@property size_t stackSize;
# endif

/*!
 * @brief Creates a new thread.
 *
 * @return A new, autoreleased thread
 */
211
212
213
214
215
216
217

































218
219

/*!
 * @brief Sets the name for the thread.
 *
 * @param name The name for the thread
 */
- (void)setName: (OFString*)name;

































#endif
@end







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

/*!
 * @brief Sets the name for the thread.
 *
 * @param name The name for the thread
 */
- (void)setName: (OFString*)name;

/*!
 * @brief Returns the priority of the thread.
 *
 * @return The priority of the thread
 */
- (float)priority;

/*!
 * @brief Sets the priority of the thread.
 *
 * @note This has to be set before the thread is started!
 *
 * @param priority The priority for the thread, with 0.0 being the lowest and
 *		   1.0 the highest
 */
- (void)setPriority: (float)priority;

/*!
 * @brief Returns the stack size of the thread.
 *
 * @return The stack size of the thread
 */
- (size_t)stackSize;

/*!
 * @brief Sets the stack size of the thread.
 *
 * @note This has to be set before the thread is started!
 *
 * @param stackSize The stack size for the thread
 */
- (void)setStackSize: (size_t)stackSize;
#endif
@end