ObjFW  Diff

Differences From Artifact [82f143b8db]:

To Artifact [2e194b355b]:


16
17
18
19
20
21
22

23
24
25
26
27
28
29

#import "OFObject.h"
#import "OFList.h"

#import "threading.h"

@class OFDate;


#ifdef OF_HAVE_BLOCKS
typedef id (^of_thread_block_t)(id object);
#endif

/**
 * \brief A class for Thread Local Storage keys.







>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

#import "OFObject.h"
#import "OFList.h"

#import "threading.h"

@class OFDate;
@class OFSortedList;

#ifdef OF_HAVE_BLOCKS
typedef id (^of_thread_block_t)(id object);
#endif

/**
 * \brief A class for Thread Local Storage keys.
90
91
92
93
94
95
96






97
98
99
100
101
102
103
		OF_THREAD_RUNNING,
		OF_THREAD_WAITING_FOR_JOIN
	} running;
#ifdef OF_HAVE_BLOCKS
	of_thread_block_t block;
#endif
	id returnValue;






}

#if defined(OF_HAVE_PROPERTIES) && defined(OF_HAVE_BLOCKS)
@property (copy) of_thread_block_t block;
#endif

/**







>
>
>
>
>
>







91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
		OF_THREAD_RUNNING,
		OF_THREAD_WAITING_FOR_JOIN
	} running;
#ifdef OF_HAVE_BLOCKS
	of_thread_block_t block;
#endif
	id returnValue;
#ifdef OF_THREAD_M
@protected
#else
@private
#endif
	OFSortedList *timersQueue;
}

#if defined(OF_HAVE_PROPERTIES) && defined(OF_HAVE_BLOCKS)
@property (copy) of_thread_block_t block;
#endif

/**
245
246
247
248
249
250
251


252
253
254
255
256
257
258
259
260
261
262
263
264
265


266
267
268
269
270
271
272
 * \return The object the join method should return when called for this thread
 */
- (id)main;

/**
 * \brief This routine is exectued when the thread's main method has finished
 *	  executing or terminate has been called.


 */
- (void)handleTermination;

/**
 * \brief Starts the thread.
 */
- (void)start;

/**
 * \brief Joins a thread.
 *
 * \return The object returned by the main method of the thread.
 */
- (id)join;


@end

/**
 * \brief A class for creating mutual exclusions.
 */
@interface OFMutex: OFObject
{







>
>














>
>







252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
 * \return The object the join method should return when called for this thread
 */
- (id)main;

/**
 * \brief This routine is exectued when the thread's main method has finished
 *	  executing or terminate has been called.
 *
 * \note Be sure to call [super handleTermination]!
 */
- (void)handleTermination;

/**
 * \brief Starts the thread.
 */
- (void)start;

/**
 * \brief Joins a thread.
 *
 * \return The object returned by the main method of the thread.
 */
- (id)join;

- (OFSortedList*)_timersQueue;
@end

/**
 * \brief A class for creating mutual exclusions.
 */
@interface OFMutex: OFObject
{