Differences From Artifact [03f9920eb4]:
- File src/OFThread.m — part of check-in [6069030651] at 2012-08-05 17:34:39 on branch trunk — Add OFRecursiveMutex class. (user: js, size: 10494) [annotate] [blame] [check-ins using]
To Artifact [b522bb5862]:
- File
src/OFThread.m
— part of check-in
[e8f12e5de9]
at
2012-08-11 08:39:32
on branch trunk
— OFThread: Set status before spawning thread.
This way, it's not possible to set the status after the thread has
already set it, though this should only happen if the thread instantly
terminates. (user: js, size: 10494) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
269 270 271 272 273 274 275 276 277 278 279 280 281 282 | if (running == OF_THREAD_WAITING_FOR_JOIN) { of_thread_detach(thread); [returnValue release]; } [self retain]; if (!of_thread_new(&thread, call_main, self)) { [self release]; @throw [OFThreadStartFailedException exceptionWithClass: [self class] thread: self]; } | > > < < | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | if (running == OF_THREAD_WAITING_FOR_JOIN) { of_thread_detach(thread); [returnValue release]; } [self retain]; running = OF_THREAD_RUNNING; if (!of_thread_new(&thread, call_main, self)) { [self release]; @throw [OFThreadStartFailedException exceptionWithClass: [self class] thread: self]; } } - (id)join { if (running == OF_THREAD_NOT_RUNNING || !of_thread_join(thread)) @throw [OFThreadJoinFailedException exceptionWithClass: [self class] |
︙ | ︙ |