async
-
defer (async throwing contexts)Swift 2025. 5. 30. 09:30
์๋ ํ์ธ์. ๊ทธ๋ฆฐ์ ๋๋ค ๐์ค๋ ํฌ์คํ ์์๋ async ๋ฐ throws ์ปจํ ์คํธ์์ defer๋ฅผ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ ๋ํด ํ๋ฒ ์์ฑํด๋ณผ๊น ํฉ๋๋ค ๐๐ป ์ต๊ทผ Swift by Sundell ์ฌ์ดํธ์์ ํด๋น ๊ด๋ จํ ํฌ์คํธ๋ฅผ ์ ํ๊ฒ ๋์๊ณ ๊ฝค ํฅ๋ฏธ๋ก์ด ๋ด์ฉ์ด๋ผ ํ๋ฒ ๋ณด๊ณ ์ ๋ฆฌํด๋ณด๋ ค๊ณ ํด์! ํด๋น ์๋ณธ ์ํฐํด์ ๋ณด์๋ ค๋๋ถ์ ์๊ฑธ ๋ณด์๋ฉด ๋ฉ๋๋ค ๐ Using Swift’s defer keyword within async and throwing contexts | Swift by SundellHow Swift’s defer keyword can be incredibly useful when working with code scopes that have multiple exit points, such as throw..