130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
* @brief The priority of the thread.
*
* @note This has to be set before the thread is started!
*
* This is a value between -1.0 (meaning lowest priority that still schedules)
* and +1.0 (meaning highest priority that still allows getting preempted)
* with normal priority being 0.0 (meaning being the same as the main thread).
*/
@property (nonatomic) float priority;
/**
* @brief The stack size of the thread.
*
* @note This has to be set before the thread is started!
*/
@property (nonatomic) size_t stackSize;
/**
* @brief Whether the thread supports sockets.
*
* Some operating systems such as AmigaOS need special per-thread
* initialization of sockets. If you intend to use sockets in the thread, set
* this property to true before starting the thread.
*/
@property (nonatomic) bool supportsSockets;
/**
* @brief Creates a new thread.
*
* @return A new, autoreleased thread
|
>
>
>
>
>
>
>
>
>
>
|
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
* @brief The priority of the thread.
*
* @note This has to be set before the thread is started!
*
* This is a value between -1.0 (meaning lowest priority that still schedules)
* and +1.0 (meaning highest priority that still allows getting preempted)
* with normal priority being 0.0 (meaning being the same as the main thread).
*
* @throw OFThreadStillRunningException The thread is already/still running and
* thus the priority cannot be changed
*/
@property (nonatomic) float priority;
/**
* @brief The stack size of the thread.
*
* @note This has to be set before the thread is started!
*
* @throw OFThreadStillRunningException The thread is already/still running and
* thus the stack size cannot be changed
*/
@property (nonatomic) size_t stackSize;
/**
* @brief Whether the thread supports sockets.
*
* Some operating systems such as AmigaOS need special per-thread
* initialization of sockets. If you intend to use sockets in the thread, set
* this property to true before starting the thread.
*
* @throw OFThreadStillRunningException The thread is already/still running and
* thus the sockets support cannot be
* enabled/disabled
*/
@property (nonatomic) bool supportsSockets;
/**
* @brief Creates a new thread.
*
* @return A new, autoreleased thread
|
239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
*/
+ (void)terminate OF_NO_RETURN;
/**
* @brief Terminates the current thread, letting it return the specified object.
*
* @param object The object which the terminated thread will return
*/
+ (void)terminateWithObject: (nullable id)object OF_NO_RETURN;
/**
* @brief Sets the name of the current thread.
*
* Unlike the instance method, this can be used after the thread has been
|
>
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
*/
+ (void)terminate OF_NO_RETURN;
/**
* @brief Terminates the current thread, letting it return the specified object.
*
* @param object The object which the terminated thread will return
* @throw OFInvalidArgumentException The method was called from the main thread
*/
+ (void)terminateWithObject: (nullable id)object OF_NO_RETURN;
/**
* @brief Sets the name of the current thread.
*
* Unlike the instance method, this can be used after the thread has been
|
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
|
*
* @note Be sure to call [super handleTermination]!
*/
- (void)handleTermination OF_REQUIRES_SUPER;
/**
* @brief Starts the thread.
*/
- (void)start;
/**
* @brief Joins a thread.
*
* @return The object returned by the main method of the thread.
*/
- (id)join;
#else
- (instancetype)init OF_UNAVAILABLE;
#endif
@end
OF_ASSUME_NONNULL_END
|
>
>
>
>
|
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
|
*
* @note Be sure to call [super handleTermination]!
*/
- (void)handleTermination OF_REQUIRES_SUPER;
/**
* @brief Starts the thread.
*
* @throw OFThreadStillRunningException The thread is still running
* @throw OFThreadStartFailedException Starting the thread failed
*/
- (void)start;
/**
* @brief Joins a thread.
*
* @return The object returned by the main method of the thread.
* @throw OFThreadJoinFailedException Joining the thread failed
*/
- (id)join;
#else
- (instancetype)init OF_UNAVAILABLE;
#endif
@end
OF_ASSUME_NONNULL_END
|