Skip to content

Commit

Permalink
style(lint): Auto commit lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
getsantry[bot] authored Aug 18, 2023
1 parent 940bb3c commit 1ab7ec5
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,4 @@ dispatch_apply(numberOfNumbers, dispatch_get_global_queue(QOS_CLASS_UTILITY, 0),
});
```

There are several things to Keep in mind when introducing concurrency:
- you may need to `@synchronize` critical sections, use semaphores, or dispatch back to a serial queue (or the main queue for UI work)
- you may not be able to parallelize loops whose iterations are dependent or where order is significant
- parallelization may not be more efficient for small collections, as [thread spawning has its own costs](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/AboutThreads/AboutThreads.html#//apple_ref/doc/uid/10000057i-CH6-SW20); always measure first!
- both `enumerateObjects...` and `dispatch_apply` are synchronous and won't return until all iterations have completed. Dispatch their invocation asynchronously off the main queue to avoid waiting.
There are several things to Keep in mind when introducing concurrency: - you may need to `@synchronize` critical sections, use semaphores, or dispatch back to a serial queue (or the main queue for UI work) - you may not be able to parallelize loops whose iterations are dependent or where order is significant - parallelization may not be more efficient for small collections, as [thread spawning has its own costs](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Multithreading/AboutThreads/AboutThreads.html#//apple_ref/doc/uid/10000057i-CH6-SW20); always measure first! - both `enumerateObjects...` and `dispatch_apply` are synchronous and won't return until all iterations have completed. Dispatch their invocation asynchronously off the main queue to avoid waiting.

0 comments on commit 1ab7ec5

Please sign in to comment.