Make Dispatcher type implementation classes final

This commit is contained in:
Garth Snyder 2019-04-06 12:59:00 -07:00
parent cc117234db
commit 3e21581aba
3 changed files with 3 additions and 3 deletions

View File

@ -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")

View File

@ -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()

View File

@ -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