큐마다 특성이 달라서 작업(구현한 코드)의 특성, 원하는 일처리에 따라 큐의 특성에 맞게 작업을 보내야 한다.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/595604f3-89ff-498c-b594-e16f13522ec9/Untitled.png

그러면 위의 그림과 같이 알아서 각자의 큐가 스레드를 생성해서 작업을 수행한다.

1. 메인큐

작업을 메인 스레드로 보낸다.

기존의 다음과 같은 코드가 있었다.

print("print something")

그럼 이것은 사실 이런 의미를 내포하고 있었던 것이다.

// 물론 이렇게 DispatchQueue.main.sync를 쓰면 에러가 난다.
DispatchQueue.main.sync { 
	print("print something")
}
DispatchQueue.main.asyncAfter(.now() + 2) {	
}
// -> 2초 뒤에 메인 스레드로 작업을 보낼거다. 

2. 글로벌큐와 Qos(서비스품질)에 대한 이해

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/10606900-f211-4ca2-a3eb-43caeb22ee61/Untitled.png

특이한 상황