Makes queue status accessible out of the framework (#169)

This commit is contained in:
Diego Sánchez 2016-06-30 15:48:40 +01:00 committed by GitHub
parent 7a0f8d8e58
commit 61fe370e86
1 changed files with 4 additions and 2 deletions

View File

@ -32,11 +32,13 @@ public protocol SerialTaskQueueProtocol {
func stop()
func flushQueue()
var isEmpty: Bool { get }
var isStopped: Bool { get }
}
public final class SerialTaskQueue: SerialTaskQueueProtocol {
private var isBusy = false
private var isStopped = true
public private(set) var isBusy = false
public private(set) var isStopped = true
private var tasksQueue = [TaskClosure]()
public init() {}