Differences From Artifact [6bf58b8f5f]:
- File
src/OFThread.m
— part of check-in
[3d16a30f41]
at
2013-06-22 12:12:36
on branch trunk
— Rework exceptions.
This mostly removes the argument for the class in which the exception
occurred. As backtraces were recently added for all platforms, the
passed class does not give any extra information on where the exception
occurred anymore.This also removes a few other arguments which were not too helpful. In
the past, the idea was to pass as many arguments as possible so that it
is easier to find the origin of the exception. However, as backtraces
are a much better way to find the origin, those are not useful anymore
and just make the exception more cumbersome to use. The rule is now to
only pass arguments that might help in recovering from the exception or
provide information that is otherwise not easily accessible. (user: js, size: 7640) [annotate] [blame] [check-ins using]
To Artifact [076ba07ad1]:
- File
src/OFThread.m
— part of check-in
[a3639589d3]
at
2013-06-30 18:30:12
on branch trunk
— Rename -[initWithBlock:].
It is now called -[initWithThreadBlock:] in order to prevent method
signature conflicts.This also fixes a missing release for the thread block. (user: js, size: 7768) [annotate] [blame] [check-ins using]
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | - - + + | objc_autoreleasePoolPush(); /* * Nasty workaround for thread implementations which can't return a * value on join. */ # ifdef OF_HAVE_BLOCKS |
︙ | |||
124 125 126 127 128 129 130 | 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | - + - + - + | # endif } #endif @implementation OFThread #ifdef OF_HAVE_THREADS # if defined(OF_HAVE_PROPERTIES) && defined(OF_HAVE_BLOCKS) |
︙ | |||
264 265 266 267 268 269 270 | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + - + | if (!of_tlskey_set(threadSelfKey, mainThread)) @throw [OFInitializationFailedException exceptionWithClass: self]; } # ifdef OF_HAVE_BLOCKS |
︙ | |||
378 379 380 381 382 383 384 385 386 387 388 389 390 391 | 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | + + + | * the resources. */ if (_running == OF_THREAD_WAITING_FOR_JOIN) of_thread_detach(_thread); [_returnValue release]; [_runLoop release]; # ifdef OF_HAVE_BLOCKS [_threadBlock release]; # endif [super dealloc]; } #else - init { @try { |
︙ |