Differences From Artifact [41a9132f9a]:
- File
src/OFThread.m
— part of check-in
[c211f691e7]
at
2017-10-07 15:12:51
on branch trunk
— OFThread: Fix setting the name on the wrong thread
This time for real. (user: js, size: 9190) [annotate] [blame] [check-ins using]
To Artifact [2b6b7f737c]:
- File
src/OFThread.m
— 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: 9236) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
303 304 305 306 307 308 309 | mainThread->_thread = of_thread_current(); if (!of_tlskey_set(threadSelfKey, mainThread)) @throw [OFInitializationFailedException exceptionWithClass: self]; } | | | | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | mainThread->_thread = of_thread_current(); if (!of_tlskey_set(threadSelfKey, mainThread)) @throw [OFInitializationFailedException exceptionWithClass: self]; } - (instancetype)init { self = [super init]; @try { if (!of_thread_attr_init(&_attr)) @throw [OFInitializationFailedException exceptionWithClass: [self class]]; } @catch (id e) { [self release]; @throw e; } return self; } # ifdef OF_HAVE_BLOCKS - (instancetype)initWithThreadBlock: (of_thread_block_t)threadBlock { self = [self init]; @try { _threadBlock = [threadBlock copy]; } @catch (id e) { [self release]; |
︙ | ︙ | |||
383 384 385 386 387 388 389 | @throw [OFThreadJoinFailedException exceptionWithThread: self]; _running = OF_THREAD_NOT_RUNNING; return _returnValue; } | | | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | @throw [OFThreadJoinFailedException exceptionWithThread: self]; _running = OF_THREAD_NOT_RUNNING; return _returnValue; } - (id)copy { return [self retain]; } - (OFRunLoop *)runLoop { # if defined(OF_HAVE_ATOMIC_OPS) && !defined(__clang_analyzer__) |
︙ | ︙ | |||
456 457 458 459 460 461 462 | # ifdef OF_HAVE_BLOCKS [_threadBlock release]; # endif [super dealloc]; } #else | | | 456 457 458 459 460 461 462 463 464 465 466 467 468 | # ifdef OF_HAVE_BLOCKS [_threadBlock release]; # endif [super dealloc]; } #else - (instancetype)init { OF_INVALID_INIT_METHOD } #endif @end |