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
- ios
- APNS
- 티스토리챌린지
- WWDC
- SWIFT
- 야곰 # 야곰아카데미커리어스타터캠프 #iOS개발자 # 부트캠프
- 오블완
- modern concurrency deep dive
Archives
- Today
- Total
Geon
Modern Concurrency Deep Dive(17) 본문
iOS developer essential skills/Modern Concurency
Modern Concurrency Deep Dive(17)
jgkim1008 2024. 12. 10. 01:06암시적 취소 전파
func getImage() asnyc throws -> [UIImage] {
var array: [UIImage] = []
async let image1 = fetchImage()
async let image2 = fetchImage()
asnyc let iamge3 = fetchImage()
// 빨리 끝나는 작업을 먼저 하는게 좋음
// image1에서 오류가나면 나머지 비동기 작업은 취소 image2까지는 작업이 될 확률이 높음
// 가장 에러가 발생하기 쉬운?? 작업을 앞 쪽에 배치 필요
let image1 = try await image1
let iamge2 = try await image2
let image3 = try await image3
array.append(image1,image2,image3)
}
- 외부에서 취소가 아닌 내부에서 오류로 인해 취소되었을떄, 부모에서 내부적으로 전파하는것을 암시적 취소 전파라고 할수 있다.
- 외부에서 취소는 명시적 취소 전파라 할수 있다.
'iOS developer essential skills > Modern Concurency' 카테고리의 다른 글
Modern Concurrency Deep Dive(18) (1) | 2024.12.11 |
---|---|
Modern Concurrency Deep Dive(16) (0) | 2024.12.02 |
Modern Concurrency Deep Dive(15) (0) | 2024.11.28 |
Modern Concurrency Deep Dive(14) (0) | 2024.11.27 |
Modern Concurrency Deep Dive(13) (1) | 2024.11.26 |