Overview
Comment: | OFThread: Fix setting the name on the wrong thread
The name of the thread may only be set from the thread itself. So the |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | 0.90 |
Files: | files | file ages | folders |
SHA3-256: |
1d0042a0406ef262acc45a17ae57c5ad |
User & Date: | js on 2017-10-07 10:46:59 |
Other Links: | branch diff | manifest | tags |
Context
2017-10-07
| ||
10:50 | OFThread: Mark the thread block nullable check-in: ead26485f6 user: js tags: 0.90 | |
10:46 | OFThread: Fix setting the name on the wrong thread check-in: 1d0042a040 user: js tags: 0.90 | |
2017-10-01
| ||
21:13 | Fix testing the wrong OFKernelEventObserver check-in: 13025565d3 user: js tags: 0.90 | |
Changes
Modified src/OFThread.h from [8bc0990f48] to [c358f93979].
︙ | |||
73 74 75 76 77 78 79 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + + + + + - + - + | id _returnValue; OFRunLoop *_Nullable _runLoop; OFMutableDictionary *_threadDictionary; @private OFString *_Nullable _name; } /*! * The name for the thread to use when starting it. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *name; |
︙ | |||
198 199 200 201 202 203 204 | 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - - - - - - - - - - - - - - | /*! * @brief Returns the run loop for the thread. * * @return The run loop for the thread */ - (OFRunLoop *)runLoop; |
︙ |
Modified src/OFThread.m from [3ff1e2b592] to [e0cab8357e].
︙ | |||
124 125 126 127 128 129 130 131 132 133 134 135 136 137 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | + | [thread release]; } #endif @implementation OFThread #ifdef OF_HAVE_THREADS @synthesize name = _name; # ifdef OF_HAVE_BLOCKS @synthesize threadBlock = _threadBlock; # endif + (void)initialize { if (self != [OFThread class]) |
︙ | |||
347 348 349 350 351 352 353 | 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | - + - + | if (!of_thread_new(&_thread, callMain, self, &_attr)) { [self release]; @throw [OFThreadStartFailedException exceptionWithThread: self]; } if (_name != nil) |
︙ | |||
386 387 388 389 390 391 392 | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | - - - - - - - - - - - - - - - - | _runLoop = [[OFRunLoop alloc] init]; } # endif return _runLoop; } |
︙ |
Modified src/threading.h from [44065a1e75] to [46db014c33].
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - + | # error of_thread_is_current not implemented! # error of_thread_current not implemented! #endif extern bool of_thread_attr_init(of_thread_attr_t *attr); extern bool of_thread_new(of_thread_t *thread, void (*function)(id), id object, const of_thread_attr_t *attr); |
︙ |
Modified src/threading_pthread.m from [9d56adf88b] to [7c690c290a].
︙ | |||
171 172 173 174 175 176 177 | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - + - + | { pthread_exit(NULL); OF_UNREACHABLE } void |
︙ |
Modified src/threading_winapi.m from [f624bdcb51] to [5f1546849f].
︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | - + | { ExitThread(0); OF_UNREACHABLE } void |
︙ |