官术网_书友最值得收藏!

  • Learning Concurrency in Kotlin
  • Miguel Angel Castiblanco Torres
  • 91字
  • 2021-08-05 10:46:49

Platform-specific UI libraries

Given that there are many types of GUI applications for the JVM, Kotlin has separated some platform-specific coroutine functionality into libraries.

  • kotlinx-coroutines-android
  • kotlinx-coroutines-javafx
  • kotlinx-coroutines-swing

Notice that all these platforms have the same UI model that we talked about before, in which only the UI thread can create and update the views. So, these tiny libraries are simply a CoroutineDispatcher that is implemented to confine coroutines to the UI thread.

The Android library also adds support for some exception pre-handling at thread level that is specific to Android. 
主站蜘蛛池模板: 三江| 河源市| 敦化市| 禹城市| 韶关市| 陇南市| 大英县| 凌云县| 巴南区| 冷水江市| 习水县| 孟津县| 涿鹿县| 皮山县| 韶山市| 长宁区| 化隆| 揭阳市| 商河县| 榆社县| 会东县| 安西县| 博罗县| 闻喜县| 夏邑县| 大同县| 绵阳市| 绥化市| 揭西县| 永德县| 慈溪市| 丰顺县| 沾益县| 长治市| 梅河口市| 潮州市| 玉屏| 敖汉旗| 扎鲁特旗| 奉贤区| 关岭|