@@ -61,7 +61,7 @@ public extension Sequence where Element: ParseObject {
61
61
62
62
/**
63
63
Saves a collection of objects *synchronously* all at once and throws an error if necessary.
64
- - parameter batchLimit: The maximum number of objects to send in each batch. If the items to be batched
64
+ - parameter batchLimit: The maximum number of objects to send in each batch. If the items to be batched.
65
65
is greater than the `batchLimit`, the objects will be sent to the server in waves up to the `batchLimit`.
66
66
Defaults to 50.
67
67
- parameter transaction: Treat as an all-or-nothing operation. If some operation failure occurs that
@@ -126,7 +126,7 @@ public extension Sequence where Element: ParseObject {
126
126
if transaction {
127
127
batchLimit = commands. count
128
128
} else {
129
- batchLimit = limit != nil ? limit! : ParseConstants . batchLimit
129
+ batchLimit = limit ?? ParseConstants . batchLimit
130
130
}
131
131
let batches = BatchUtils . splitArray ( commands, valuesPerSegment: batchLimit)
132
132
try batches. forEach {
@@ -143,7 +143,7 @@ public extension Sequence where Element: ParseObject {
143
143
144
144
/**
145
145
Saves a collection of objects all at once *asynchronously* and executes the completion block when done.
146
- - parameter batchLimit: The maximum number of objects to send in each batch. If the items to be batched
146
+ - parameter batchLimit: The maximum number of objects to send in each batch. If the items to be batched.
147
147
is greater than the `batchLimit`, the objects will be sent to the server in waves up to the `batchLimit`.
148
148
Defaults to 50.
149
149
- parameter transaction: Treat as an all-or-nothing operation. If some operation failure occurs that
@@ -163,8 +163,12 @@ public extension Sequence where Element: ParseObject {
163
163
callbackQueue: DispatchQueue = . main,
164
164
completion: @escaping ( Result < [ ( Result < Element , ParseError > ) ] , ParseError > ) -> Void
165
165
) {
166
- let queue = DispatchQueue ( label: " com.parse.saveAll " , qos: . default,
167
- attributes: . concurrent, autoreleaseFrequency: . inherit, target: nil )
166
+ let uuid = UUID ( )
167
+ let queue = DispatchQueue ( label: " com.parse.saveAll. \( uuid) " ,
168
+ qos: . default,
169
+ attributes: . concurrent,
170
+ autoreleaseFrequency: . inherit,
171
+ target: nil )
168
172
queue. sync {
169
173
170
174
var childObjects = [ String: PointerType] ( )
@@ -220,7 +224,7 @@ public extension Sequence where Element: ParseObject {
220
224
if transaction {
221
225
batchLimit = commands. count
222
226
} else {
223
- batchLimit = limit != nil ? limit! : ParseConstants . batchLimit
227
+ batchLimit = limit ?? ParseConstants . batchLimit
224
228
}
225
229
let batches = BatchUtils . splitArray ( commands, valuesPerSegment: batchLimit)
226
230
var completed = 0
@@ -361,7 +365,7 @@ public extension Sequence where Element: ParseObject {
361
365
362
366
/**
363
367
Deletes a collection of objects *synchronously* all at once and throws an error if necessary.
364
- - parameter batchLimit: The maximum number of objects to send in each batch. If the items to be batched
368
+ - parameter batchLimit: The maximum number of objects to send in each batch. If the items to be batched.
365
369
is greater than the `batchLimit`, the objects will be sent to the server in waves up to the `batchLimit`.
366
370
Defaults to 50.
367
371
- parameter transaction: Treat as an all-or-nothing operation. If some operation failure occurs that
@@ -390,7 +394,7 @@ public extension Sequence where Element: ParseObject {
390
394
if transaction {
391
395
batchLimit = commands. count
392
396
} else {
393
- batchLimit = limit != nil ? limit! : ParseConstants . batchLimit
397
+ batchLimit = limit ?? ParseConstants . batchLimit
394
398
}
395
399
let batches = BatchUtils . splitArray ( commands, valuesPerSegment: batchLimit)
396
400
try batches. forEach {
@@ -404,7 +408,7 @@ public extension Sequence where Element: ParseObject {
404
408
405
409
/**
406
410
Deletes a collection of objects all at once *asynchronously* and executes the completion block when done.
407
- - parameter batchLimit: The maximum number of objects to send in each batch. If the items to be batched
411
+ - parameter batchLimit: The maximum number of objects to send in each batch. If the items to be batched.
408
412
is greater than the `batchLimit`, the objects will be sent to the server in waves up to the `batchLimit`.
409
413
Defaults to 50.
410
414
- parameter transaction: Treat as an all-or-nothing operation. If some operation failure occurs that
@@ -439,7 +443,7 @@ public extension Sequence where Element: ParseObject {
439
443
if transaction {
440
444
batchLimit = commands. count
441
445
} else {
442
- batchLimit = limit != nil ? limit! : ParseConstants . batchLimit
446
+ batchLimit = limit ?? ParseConstants . batchLimit
443
447
}
444
448
let batches = BatchUtils . splitArray ( commands, valuesPerSegment: batchLimit)
445
449
var completed = 0
@@ -633,9 +637,12 @@ extension ParseObject {
633
637
internal func ensureDeepSave( options: API . Options = [ ] ,
634
638
completion: @escaping ( [ String : PointerType ] ,
635
639
[ UUID : ParseFile ] , ParseError ? ) -> Void ) {
636
-
637
- let queue = DispatchQueue ( label: " com.parse.deepSave " , qos: . default,
638
- attributes: . concurrent, autoreleaseFrequency: . inherit, target: nil )
640
+ let uuid = UUID ( )
641
+ let queue = DispatchQueue ( label: " com.parse.deepSave. \( uuid) " ,
642
+ qos: . default,
643
+ attributes: . concurrent,
644
+ autoreleaseFrequency: . inherit,
645
+ target: nil )
639
646
640
647
queue. sync {
641
648
var objectsFinishedSaving = [ String: PointerType] ( )
0 commit comments