Make Dispatcher type implementation classes final
This commit is contained in:
parent
cc117234db
commit
3e21581aba
@ -3,7 +3,7 @@ import Foundation
|
||||
/// A PromiseKit Dispatcher that allows no more than X simultaneous
|
||||
/// executions at once.
|
||||
|
||||
public class ConcurrencyLimitedDispatcher: Dispatcher {
|
||||
public final class ConcurrencyLimitedDispatcher: Dispatcher {
|
||||
|
||||
let queue: Dispatcher
|
||||
let serializer: DispatchQueue = DispatchQueue(label: "CLD serializer")
|
||||
|
||||
@ -19,7 +19,7 @@ import Foundation
|
||||
///
|
||||
/// 100% thread safe.
|
||||
|
||||
public class RateLimitedDispatcher: RateLimitedDispatcherBase {
|
||||
public final class RateLimitedDispatcher: RateLimitedDispatcherBase {
|
||||
|
||||
private var tokensInBucket: Double = 0
|
||||
private var latestAccrual: DispatchTime = DispatchTime.now()
|
||||
|
||||
@ -19,7 +19,7 @@ import Foundation
|
||||
///
|
||||
/// 100% thread safe.
|
||||
|
||||
public class StrictRateLimitedDispatcher: RateLimitedDispatcherBase {
|
||||
public final class StrictRateLimitedDispatcher: RateLimitedDispatcherBase {
|
||||
|
||||
internal var startTimeHistory: Queue<DispatchTime>
|
||||
private var immediateDispatchesAvailable: Int
|
||||
|
||||
Loading…
Reference in New Issue
Block a user