Differences From Artifact [eeffe88350]:
- File src/OFThread.h — part of check-in [ac70a7059f] at 2012-11-03 22:19:14 on branch trunk — Small workaround for a Haiku bug. (user: js, size: 5382) [annotate] [blame] [check-ins using]
To Artifact [9008bb5cf4]:
- File
src/OFThread.h
— part of check-in
[0639a351db]
at
2012-11-10 00:14:59
on branch trunk
— Remove "object" from OFThread.
Blocks don't allow passing it anymore and without blocks, subclassing is
necessary anyway so that an ivar with the correct type can be added
(instead of id) if required. (user: js, size: 4881) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
25 26 27 28 29 30 31 | #endif @class OFDate; @class OFSortedList; @class OFRunLoop; #ifdef OF_HAVE_BLOCKS | | | < < | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #endif @class OFDate; @class OFSortedList; @class OFRunLoop; #ifdef OF_HAVE_BLOCKS typedef id (^of_thread_block_t)(void); #endif /*! * @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 #endif of_thread_t thread; enum { OF_THREAD_NOT_RUNNING, OF_THREAD_RUNNING, OF_THREAD_WAITING_FOR_JOIN |
︙ | ︙ | |||
72 73 74 75 76 77 78 | /*! * @brief Creates a new thread. * * @return A new, autoreleased thread */ + (instancetype)thread; | < < < < < < < < | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | /*! * @brief Creates a new thread. * * @return A new, autoreleased thread */ + (instancetype)thread; #ifdef OF_HAVE_BLOCKS /*! * @brief Creates a new thread with the specified block. * * @param block A block which is executed by the thread * @return A new, autoreleased thread */ |
︙ | ︙ | |||
162 163 164 165 166 167 168 | * * @param object The object which the terminated thread will return */ + (void)terminateWithObject: (id)object; + (void)OF_createMainThread; | < < < < < < < < | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | * * @param object The object which the terminated thread will return */ + (void)terminateWithObject: (id)object; + (void)OF_createMainThread; #ifdef OF_HAVE_BLOCKS /*! * @brief Initializes an already allocated thread with the specified block. * * @param block A block which is executed by the thread * @return An initialized OFThread. */ |
︙ | ︙ |