-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgcdAsyncCurrentQueue.codesnippet
More file actions
40 lines (36 loc) · 1.23 KB
/
gcdAsyncCurrentQueue.codesnippet
File metadata and controls
40 lines (36 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDECodeSnippetCompletionPrefix</key>
<string>gcd_async_current</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>CodeBlock</string>
</array>
<key>IDECodeSnippetContents</key>
<string>
dispatch_queue_t callerQueue = dispatch_get_current_queue();
dispatch_queue_t <#queueName#> = dispatch_queue_create("<#queueLabel#>", NULL);
dispatch_async(<#queueName#>, ^{
// Do async work
dispatch_async(callerQueue, ^{
// Finish work on the caller's queue
});
});
dispatch_release(<#queueName#>);
</string>
<key>IDECodeSnippetIdentifier</key>
<string>0CB5B30F-E8C4-46CE-A599-00C4BCEF8A22</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Objective-C</string>
<key>IDECodeSnippetSummary</key>
<string>gcd_async_current</string>
<key>IDECodeSnippetTitle</key>
<string>GCD: Async Current Queue</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
</dict>
</plist>