 	private let database: SyncDatabase
 	
 	private weak var currentSyncAllOperation: FeedlySyncAllOperation?
+	private let operationQueue: OperationQueue
 	
 	init(dataFolder: String, transport: Transport?, api: FeedlyAPICaller.API) {
+		self.operationQueue = OperationQueue()
+		// Many operations have their own operation queues, such as the sync all operation.
+		// Making this a serial queue at this higher level of abstraction means we can ensure,
+		// for example, a `FeedlyRefreshAccessTokenOperation` occurs before a `FeedlySyncAllOperation`,
+		// improving our ability to debug, reason about and predict the behaviour of the code.
+		self.operationQueue.maxConcurrentOperationCount = 1
 		
 		if let transport = transport {
-			caller = FeedlyAPICaller(transport: transport, api: api)
+			self.caller = FeedlyAPICaller(transport: transport, api: api)
 			
 		} else {
 			

		
		currentSyncAllOperation = operation
		
		OperationQueue.main.addOperation(operation)
	}
	
	func sendArticleStatus(for account: Account, completion: @escaping ((Result<Void, Error>) -> Void)) {

		
		let client = FeedlyAccountDelegate.oauthAuthorizationClient
		let refreshAccessToken = FeedlyRefreshAccessTokenOperation(account: account, service: self, oauthClient: client, log: log)
		operationQueue.addOperation(refreshAccessToken)
	}
	
	static func validateCredentials(transport: Transport, credentials: Credentials, endpoint: URL?, completion: @escaping (Result<Credentials?, Error>) -> Void) {
		assertionFailure("An `account` instance should enqueue an \(FeedlyRefreshAccessTokenOperation.self) instead.")
		completion(.success(credentials))
	}
}
