Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created June 10, 2020 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencurtis/517475c3015876f2f93548687ade017d to your computer and use it in GitHub Desktop.
Save stevencurtis/517475c3015876f2f93548687ade017d to your computer and use it in GitHub Desktop.
queuemanager
class QueueManager {
lazy var queue: OperationQueue = {
let queue = OperationQueue()
return queue;
}()
static let shared = QueueManager()
// MARK: - Add Operation
func enqueue(_ operation: Operation) {
queue.addOperation(operation)
}
}
let queueManager = QueueManager()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment