The difference between Thread.sleep() and Task.sleep()

Swift 5.5 introduces tasks, which represent a unit of work that can be run asynchronously. In this post, Marin Todorov compares Thread.sleep() and Task.sleep(), using this comparison to help explain some of the benefits of Swift's new concurrency model.