Skip to content

GCD API 동작 방식과 필요성에 대해 설명하시오. #32

Description

@Glsme

GCD

동시작업을 관리하기 위한 Low Level API이다.

GCD 동작 방식

  • GCD는 DispatchQueue라는 Queue를 사용한다.
  • DispatchQueue에서 작업이 추가되면 GCD는 작업에 맞는 Thread를 자동으로 생성하여 실행하고, 작업이 종료되면 Thread를 제거한다.

DispatchQueue

  • 앱의 메인 스레드나 백그라운드 스레드에서 직렬 또는 동시 작업 실행을 관리하는 객체이다.



GCD 필요성

  • GCD를 사용하면 스레드 생성, 유지, 삭제 등을 개발자가 신경쓸 필요 없이 작업을 큐에 예약하기만 하면 되기 때문에 편리하다.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions