Adjust random logic for dispatch queue
This commit is contained in:
parent
12ce18a036
commit
8e0dc7e858
|
@ -11,7 +11,8 @@ This version adjusts the library for Xcode 14 and deprecates some things.
|
|||
|
||||
### 💡 Behavior changes
|
||||
|
||||
* The library no longer uses the DocC package plugin.
|
||||
* The library no longer uses the DocC package plugin.
|
||||
* `DispatchQueue+Throttle` now uses `Double.random(in:)` instead of `arc4random()`.
|
||||
|
||||
### 🗑 Deprecations
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
import Foundation
|
||||
|
||||
private var lastDebounceCallTimes = [AnyHashable: DispatchTime]()
|
||||
private let nilContext: AnyHashable = arc4random()
|
||||
private let nilContext: AnyHashable = Int.random(in: 0...100_000)
|
||||
private var throttleWorkItems = [AnyHashable: DispatchWorkItem]()
|
||||
|
||||
public extension DispatchQueue {
|
||||
|
|
Loading…
Reference in New Issue