Differences From 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]
To Artifact [b43535f12f]:
- File
src/OFThread.h
— part of check-in
[debba8efb6]
at
2012-11-10 10:27:08
on branch trunk
— Make it possible to give threads a name.
On Haiku, this even renames the Haiku thread so that in a process
manager the thread's name can be seen. If no name has been set, it uses
the class name as name for the Haiku thread. (user: js, size: 5217) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
57 58 59 60 61 62 63 64 65 | OF_THREAD_WAITING_FOR_JOIN } running; #ifdef OF_HAVE_BLOCKS of_thread_block_t block; #endif id returnValue; OFRunLoop *runLoop; } | > | > > > | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | OF_THREAD_WAITING_FOR_JOIN } running; #ifdef OF_HAVE_BLOCKS of_thread_block_t block; #endif id returnValue; OFRunLoop *runLoop; OFString *name; } #ifdef OF_HAVE_PROPERTIES # ifdef OF_HAVE_BLOCKS @property (copy) of_thread_block_t block; # endif @property (copy) OFString *name; #endif /*! * @brief Creates a new thread. * * @return A new, autoreleased thread */ |
︙ | ︙ | |||
198 199 200 201 202 203 204 205 | /*! * @brief Returns the run loop for the thread. * * @return The run loop for the thread */ - (OFRunLoop*)runLoop; @end | > > > > > > > > > > > > > > | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | /*! * @brief Returns the run loop for the thread. * * @return The run loop for the thread */ - (OFRunLoop*)runLoop; /*! * @brief Returns the name of the thread or nil if none has been set. * * @return The name of the thread or nik if none has been set */ - (OFString*)name; /*! * @brief Sets the name for the thread. * * @param name The name for the thread */ - (void)setName: (OFString*)name; @end |