From d52de19dbfd340a91a95d3431e772e1f6ed1fa54 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Tue, 14 Apr 2020 10:27:11 +1000 Subject: [PATCH] Add TODO --- SignalServiceKit/src/Loki/API/LokiAPI.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SignalServiceKit/src/Loki/API/LokiAPI.swift b/SignalServiceKit/src/Loki/API/LokiAPI.swift index ce0cdeba9..a60510de3 100644 --- a/SignalServiceKit/src/Loki/API/LokiAPI.swift +++ b/SignalServiceKit/src/Loki/API/LokiAPI.swift @@ -1,5 +1,10 @@ import PromiseKit +// TODO: A lot of the API relies on things happening serially and state being maintained correctly (i.e. without +// race conditions). To this end we should just have one high quality serial queue and do everything on there, except +// for things that explicitly *can* be done in parallel and don't modify state, any which should then happen +// on a global queue. + @objc(LKAPI) public final class LokiAPI : NSObject { private static let stateQueue = DispatchQueue(label: "LokiAPI.stateQueue")