Kotlin Coroutines by Tutorials

Tác giả : Babic F
  • Lượt đọc : 339
  • Kích thước : 1.84 MB
  • Số trang : 146
  • Đăng lúc : 2 năm trước
  • Số lượt tải : 218
  • Số lượt xem : 2.046
  • Đọc trên điện thoại :
The UI (user interface) is a fundamental part of almost every application. It’s what users see and interact with in order to do their tasks. More often than not, the applications do complex work, such as talking to external services or processing data from a database. Then, when the work is done, it shows a result, mostly in some form of a message.
The UI must be responsive. If the work at hand takes a lot of time to complete, it’s necessary to provide feedback to the users so that they don’t feel like the application has frozen, for example, or that they didn’t click a button properly — or perhaps that the feature doesn’t work at all.
In this chapter, you’ll learn how to provide useful information to the users about what’s happening in the application and what different mechanisms exist for working with multiple tasks. You’ll see what problems arise while trying to do complex and long- running synchronous operations and how asynchronous programming comes to rescue.
You’ll start off by analyzing the flow of a function that deals with data processing and provides feedback to the user.