Commit 8fa0921
Fix
* Fix `schedule(after:interval:leeway:)` disposal
Retain timers in `QueueScheduler` so that they will not be cancelled if the user doesn’t retain the returned `Disposable`.
* Add pull request # and handle
* Use `Atomic` instead of `Lock`
* Separate the tests for repeated action disposal
* Use `Set` instead of `Array` to store timers
* Use `ObjectIdentifier(value).hashValue`
* Weakify `self` in the returned `Disposable`
* Fix `QueueScheduler` tests
* Fix increment in test
Specify `pollInterval` on the asynchronous expectation to avoid false positive test success.
* Conform to timer wrapper to `Hashable` by self ref
`DispatchSourceTimer` doesn’t inherit from `NSObjectProtocol` on Linux. Basing hashing and equality on the wrapper is sufficient because the same wrapper instance can be used insert and remove from the `Set` of retained timers.schedule(after:interval:leeway:) disposal (#584)1 parent bdd8ea0 commit 8fa0921
File tree
3 files changed
+100
-2
lines changed- Sources
- Tests/ReactiveSwiftTests
3 files changed
+100
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
180 | 200 | | |
181 | 201 | | |
182 | 202 | | |
| |||
192 | 212 | | |
193 | 213 | | |
194 | 214 | | |
195 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
196 | 218 | | |
197 | 219 | | |
| 220 | + | |
198 | 221 | | |
199 | 222 | | |
200 | 223 | | |
| |||
340 | 363 | | |
341 | 364 | | |
342 | 365 | | |
343 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
344 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
345 | 380 | | |
346 | 381 | | |
347 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
221 | 282 | | |
222 | 283 | | |
223 | 284 | | |
| |||
0 commit comments