<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>GCD 기본 on letmecompile</title><link>https://www.letmecompile.com/tag/gcd-%EA%B8%B0%EB%B3%B8/</link><description>Recent content in GCD 기본 on letmecompile</description><image><title>letmecompile</title><url>https://www.letmecompile.com/images/default-og-image.png</url><link>https://www.letmecompile.com/images/default-og-image.png</link></image><generator>Hugo -- 0.148.1</generator><language>ko-kr</language><lastBuildDate>Tue, 18 Mar 2014 15:24:44 +0000</lastBuildDate><atom:link href="https://www.letmecompile.com/tag/gcd-%EA%B8%B0%EB%B3%B8/index.xml" rel="self" type="application/rss+xml"/><item><title>GCD 튜토리얼</title><link>https://www.letmecompile.com/gcd-%ED%8A%9C%ED%86%A0%EB%A6%AC%EC%96%BC/</link><pubDate>Tue, 18 Mar 2014 15:24:44 +0000</pubDate><guid>https://www.letmecompile.com/gcd-%ED%8A%9C%ED%86%A0%EB%A6%AC%EC%96%BC/</guid><description>&lt;p>지난 포스트에서 블록(block)의 동작에 대해서 분석해보았는데, 이런 블록들을 이용하여 멀티스레드 프로그래밍을 손쉽게 할 수 있는 방법을 제공하는 GCD (Grand Central Dispatch) 에대해 알아보도록 하자. 본 포스트의 내용은 &lt;sup id="fnref-1">&lt;a href="#fn-1" rel="footnote">1&lt;/a>&lt;/sup> 의 내용을 요약하면서 추가적으로 유용한 내용들을 GCD 애플 문서&lt;sup id="fnref-2">&lt;a href="#fn-2" rel="footnote">2&lt;/a>&lt;/sup>에서 발췌하여 정리한 내용임을 밝힌다.&lt;/p>
&lt;h2 id="디스패치-큐의-종류">디스패치 큐의 종류&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>컨커런트 디스패치 큐 (concurrent dispatch queue) : 해당 큐 내의 작업들간에 실행 순서는 보장할 수 없다.
dispatch_queue_t queue = dispatch_queue_create(“com.letmecompile.concurrentQueue”, DISPATCH_QUEUE_CONCURRENT);&lt;/p>
&lt;/li>
&lt;li>
&lt;p>시리얼 디스패치 큐 (serial dispatch queue): 해당 큐 내의 작업들은 큐에 추가된 순서로 하나씩 수행됨을 보장한다. 때문에 시리얼큐는 하나 생성될때마다 스레드가 하나 더 생기기때문에 과도하게 많은숫자를 하면 성능에 문제가 있을 수 있다.
dispatch_queue_t queue = dispatch_queue_create(“com.letmecompile.serialQueue”, NULL);&lt;/p></description></item></channel></rss>