Skip to content

Commit

Permalink
fix: code formatting Objective-C (#7958)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-garcia committed Sep 27, 2023
1 parent cd519ae commit 85f2b1e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The “Stack Trace” section shows a full stack trace view, highlighting the lo

The following code executes a long-running `while` loop on the main thread:

```objective-c
```objc
// given an array of number strings...

NSMutableOrderedSet<NSString *> *sortedEvenNumbers = [NSMutableOrderedSet<NSString *> orderedSet];
Expand All @@ -61,7 +61,7 @@ NSMutableOrderedSet<NSString *> *sortedEvenNumbers = [NSMutableOrderedSet<NSStri

Performance could be improved by moving the long computation off of the main thread. The simplest approach is dispatching it to a lower Quality of Service (QoS) queue (or `NSOperationQueue`):

```objective-c {tabTitle:Dispatch to Background Queue}
```objc {tabTitle:Dispatch to Background Queue}
// given an array of number strings...
NSMutableOrderedSet<NSString *> *sortedEvenNumbers = [NSMutableOrderedSet<NSString *> orderedSet];
Expand All @@ -80,7 +80,7 @@ Another avenue to consider for loops is to parallelize iterations. There are sev

1. Use `dispatch_apply` to perform iterations of a general loop on a concurrent queue.

```objective-c {tabTitle:Foundation Collection Concurrent Enumeration}
```objc {tabTitle:Foundation Collection Concurrent Enumeration}
// given an array of number strings...
NSMutableOrderedSet<NSString *> *sortedEvenNumbers = [NSMutableOrderedSet<NSString *> orderedSet];
Expand All @@ -91,7 +91,7 @@ NSMutableOrderedSet<NSString *> *sortedEvenNumbers = [NSMutableOrderedSet<NSStri
}];
```

```objective-c {tabTitle:dispatch_apply}
```objc {tabTitle:dispatch_apply}
// given an array of number strings...
NSMutableOrderedSet<NSString *> *sortedEvenNumbers = [NSMutableOrderedSet<NSString *> orderedSet];
Expand Down

1 comment on commit 85f2b1e

@vercel
Copy link

@vercel vercel bot commented on 85f2b1e Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sentry-docs – ./

sentry-docs-git-master.sentry.dev
sentry-docs.sentry.dev
docs.sentry.io

Please sign in to comment.