Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- modern concurrency deep dive
- APNS
- WWDC
- ios
- SWIFT
- modern concurrency
- 티스토리챌린지
- 야곰 # 야곰아카데미커리어스타터캠프 #iOS개발자 # 부트캠프
- 오블완
Archives
- Today
- Total
목록SWIFT (1)
Geon
Modern Concurrency Deep Dive(1)
Task- 비동기의 단위이다.- 내부에 self를 참조하고 있을때 기존의 DispatchQueue와 다르게 자동으로 self를 해제해준다.(Task closure lifetime)- 즉 캡쳐를 해도 상관은없으나, 필요한 사항이 아니면 할필요가 없다. final class Mock { var image: UIImage? func someFunction() asnyc -> UIImage? { Task { Task.sleep(5) image = UIImage() // self 선언 안해줘도 된다. } }} 출저: https://developer.apple.com/documentation/swift/task#Task-closure-lifetime
iOS developer essential skills/Modern Concurency
2024. 11. 14. 23:45