Differences From Artifact [42f39cebaf]:
- File
src/OFThread.h
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 6832) [annotate] [blame] [check-ins using]
To Artifact [a03e0a91d4]:
- File
src/OFThread.h
— part of check-in
[f3ccf14461]
at
2017-10-29 21:58:14
on branch trunk
— Convert methods to properties where appropriate
This improves Swift compatibility. (user: js, size: 6187) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
91 92 93 94 95 96 97 98 99 100 101 102 103 104 | /*! * The block to execute in the thread. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) of_thread_block_t threadBlock; # endif /*! * @brief Creates a new thread. * * @return A new, autoreleased thread */ + (instancetype)thread; | > > > > > > > > > > > > > > > > > > > > > > > | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | /*! * The block to execute in the thread. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) of_thread_block_t threadBlock; # endif /*! * The run loop for the thread. */ @property (readonly, nonatomic) OFRunLoop *runLoop; /*! * 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; /*! * The stack size of the thread. * * @note This has to be set before the thread is started! */ @property (nonatomic) size_t stackSize; /*! * @brief Creates a new thread. * * @return A new, autoreleased thread */ + (instancetype)thread; |
︙ | ︙ | |||
218 219 220 221 222 223 224 | /*! * @brief Joins a thread. * * @return The object returned by the main method of the thread. */ - (id)join; | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 241 242 243 244 245 246 247 248 249 250 251 252 253 | /*! * @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 |