comment
This commit is contained in:
parent
1670cd6c40
commit
de10ed8eef
@ -50,6 +50,8 @@ import Foundation
|
|||||||
|
|
||||||
|
|
||||||
// Dispatch setup on queue to ensure setup is complete before completion callbacks.
|
// Dispatch setup on queue to ensure setup is complete before completion callbacks.
|
||||||
|
|
||||||
|
// Don't use [weak self]. Object is deallocated in the dispatch queue.
|
||||||
parametersWorkQueue.async(group: group, qos: .userInitiated) {
|
parametersWorkQueue.async(group: group, qos: .userInitiated) {
|
||||||
// Create the handler list so that same object can be used when merging. Merging needs default value in case of timeout
|
// Create the handler list so that same object can be used when merging. Merging needs default value in case of timeout
|
||||||
for parameterModel in clientParameterModel.list {
|
for parameterModel in clientParameterModel.list {
|
||||||
@ -72,7 +74,6 @@ import Foundation
|
|||||||
// Setup completion handlers. Barriered to ensure one happens after the other.
|
// Setup completion handlers. Barriered to ensure one happens after the other.
|
||||||
var complete = false
|
var complete = false
|
||||||
let timeoutWorkItem = DispatchWorkItem(qos: .userInitiated) {
|
let timeoutWorkItem = DispatchWorkItem(qos: .userInitiated) {
|
||||||
// Holding self. so that its not deallocated in the deispatch queue
|
|
||||||
completionHandler(mergedParametersList);
|
completionHandler(mergedParametersList);
|
||||||
complete = true
|
complete = true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user