We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userInteractive
userInitiated
default
utility
background
@IBAction func globalQos(_ sender: UIButton) { DispatchQueue.global(qos: .background).async { for i in 1...50 { print(i, terminator: " ") } print("\nBackground 완료") } DispatchQueue.global(qos: .userInteractive).async { for i in 51...100 { print(i, terminator: " ") } print("\nUserInteractive 완료") } DispatchQueue.global(qos: .utility).async { for i in 101...150 { print(i, terminator: " ") } print("\nUtility 완료") } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
읽기전에
GCD QoS (Quality of Service)
userInteractive
: 가장 높은 우선순위. 애니메이션, 이벤트 처리, UI 갱신 등 사용자와의 상호작용.userInitiated
: 두번째로 높은 우선순위. 빠른 반응 속도가 필요하거나, 유저가 앱에 기대하는 핵심 정보를 로딩할 때 사용.default
: 세번째로 높은 우선 순위이자 기본 값. 앱 초기화 혹은 유저를 대신해 수행하는 작업에 사용.utility
: default보다 한단계 낮은 우선순위. 바로 완료되지 않아도 앱사용에 지장이 없는 부가적인 작업에 사용.background
: 가장 낮은 우선순위. 앱이 백그라운드 상태로 갔을 때 할 작업 등에 사용.예제
출력결과
참고자료
The text was updated successfully, but these errors were encountered: