Differences From Artifact [94dbbf6fa0]:
- File
src/OFThread.m
— part of check-in
[0a55edad35]
at
2012-10-26 11:04:41
on branch trunk
— Split OFThread.m into multiple files.
It was time to finally have one file per class. (user: js, size: 6997) [annotate] [blame] [check-ins using]
To Artifact [378318c425]:
- File
src/OFThread.m
— 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: 6766) [annotate] [blame] [check-ins using]
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + | /* * Nasty workaround for thread implementations which can't return a * value on join. */ #ifdef OF_HAVE_BLOCKS if (thread->block != NULL) |
︙ | |||
110 111 112 113 114 115 116 | 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | - - - - - | } + (instancetype)thread { return [[[self alloc] init] autorelease]; } |
︙ | |||
237 238 239 240 241 242 243 | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - - - - - - - - - | mainThread->thread = of_thread_current(); if (!of_tlskey_set(threadSelfKey, mainThread)) @throw [OFInitializationFailedException exceptionWithClass: self]; } |
︙ | |||
271 272 273 274 275 276 277 | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | - + - + | [[OFRunLoop currentRunLoop] run]; return nil; } - (void)handleTermination { |
︙ | |||
338 339 340 341 342 343 344 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | - | /* * We should not be running anymore, but call detach in order to free * the resources. */ if (running == OF_THREAD_WAITING_FOR_JOIN) of_thread_detach(thread); |