# 애플이 Concurrency를 Swift에 만든 이유 (AsyncSequence)

> Clean Markdown view of GeekNews topic #13145. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=13145](https://news.hada.io/topic?id=13145)
- GeekNews Markdown: [https://news.hada.io/topic/13145.md](https://news.hada.io/topic/13145.md)
- Type: news
- Author: [stareta1202](https://news.hada.io/@stareta1202)
- Published: 2024-02-01T12:59:25+09:00
- Updated: 2024-02-01T12:59:25+09:00
- Original source: [sobabear.com](https://www.sobabear.com/blog/bYsWMJeAZw3vuSx6JaDe)
- Points: 2
- Comments: 0

## Topic Body

애플은 Concurrency 라는 새로운 패러다임을 Swift에 넣었다. 비동기 처리를 for-await-in 문을 통해서 처리한다.   
  
기존에는 Swift 는 Closure(Block function) 을 이용해서 비동기를 처리했다. 그러다가 Combine 이라는 프레임워크도 나오게 되었다. 이 컴바인 프레임워크도 Erik meijer의 RX를 애플 자체로 만든 것이다.   
  
하지만 두 위의 방식의 문제는 Swift의 GC 방식인 ARC의 한계가 있다. capture list 라는 것 때문에, 메모리 릭이 나올 수 있었고, 즉 Closure를 사용하는 방식을 피하고 싶었던 것이다. 그래서 Erik Meijer가 iterable(Sequence)과 Iterator를 뒤집어서 Reactive를 만든 것 처럼, 애플은 이를 뒤집지 않고 Async하게 만든 AsyncSequence(AsynscIterable) 과 AsyncIteraotr를 만들어서 메모리 릭 문제를 해결하고자 함과 동시에 새로운 비동기 패러다임을 제시했다.

## Comments



_No public comments on this page._
