Coroutines in KotlinCoroutines in Kotlin Andrey.Breslav@JetBrains.com This talk could have been named… • async/await/yield • fibers • [stackless] continuations Suspendable Computations Outline • Motivation/Examples languages • Kotlin’s Solution – Client code – Library code • Compiling Coroutines • Exception Handling • Appendix. Serializable Coroutines? “Legal” • All I’m saying is no more final than Valhalla J val image flexibility for library designers – with minimal runtime support – and no macros J Flavors of Coroutines Stackless Stackful Language restrictions Use in special contexts L Use anywhere J Implemented0 码力 | 39 页 | 1.01 MB | 1 年前3
From Functions to CoroutinesFrom Functions to Coroutines 40 Years Evolution Rainer Grimm Training, Coaching, and Technology Consulting www.ModernesCpp.netEvolution of Callable templateT invoke(Func 0 码力 | 29 页 | 510.47 KB | 6 月前3
Deciphering C++ Coroutines2/55 Deciphering Coroutines - Part 2 Mastering Asynchronous Control Flow Andreas Weis CppCon 20243/55 About me - Andreas Weis (he/him) ComicSansMS cpp@andreas-weis.net Co-organizer of the Munich best-practice talk.16/55 A mental model for coroutines: Cooperative Threads void spawn_task () { // ... Result r = outer_function (); }16/55 A mental model for coroutines: Cooperative Threads void spawn_task mental model for coroutines: Cooperative Threads PartialResult middle_function () { auto r = inner_function (); return PartialResult :: from_io_result (r); }16/55 A mental model for coroutines: Cooperative0 码力 | 156 页 | 1.79 MB | 6 月前3
Coroutines and Structured Concurrency in PracticeChallenges when onboarding coroutines A lot of existing code mostly callback-based A custom-built I/O event loop predates Asio by a decade fine-tuned for specific use cases Somewhat conservative conservative audience real benefit needs to be demonstrated to justify switchingCallbacks vs coroutines // read length auto len = make_unique(); async_read(socket, buffer(len.get(), sizeof(int32_t)) use_awaitable); // ...handle data... Local variable Manual lifetime managementCallbacks vs coroutines // read length auto len = make_unique (); async_read(socket, buffer(len.get(), sizeof(int32_t)) 0 码力 | 103 页 | 1.98 MB | 6 月前3
How Meta Made Debugging Async Code Easier with Coroutines and Senders0 码力 | 131 页 | 907.41 KB | 6 月前3
Behavioral Modeling in HW/SW Co-design Using C++ CoroutinesJeffrey E. Erickson cppcon 2023 1cppcon 2023 Behavioral Modeling in HW/SW Co-design using C++ coroutines Jeffrey E Erickson, Ph.D. Sebastian Schönberg, Ph.D.© 2023 Intel Corporation and Jeffrey E. Erickson Jeffrey E. Erickson cppcon 2023 8 Coroutines are an enabling language feature • To date, coroutines have been about execution and workloads • In the modeling context, coroutines… • Provide syntactic sugar Handle parallelism in a way that isn’t clunky • Scale across large and complex HW interactions But, coroutines lack comprehensive standard library support • We used concurrencppIntel Confidential Department0 码力 | 44 页 | 584.69 KB | 6 月前3
Coroutine Patterns and How to Use Them: Problems and Solutions Using Coroutines in a Modern Codebaseknowledge Francesco Zoffoli - Coroutine Patterns and How to Use Them - CppCon 2023 5Motivation Coroutines introduce new paradigm Francesco Zoffoli - Coroutine Patterns and How to Use Them - CppCon 2023 CppCon 2023 11Overview – Executor • Executes synchronous functions • Could be multi-threaded • Coroutines are split in synchronous functions Francesco Zoffoli - Coroutine Patterns and How to Use Them CppCon 2023 19 [1] https://ericniebler.com/2020/11/08/structured-concurrency/Lifetime Member coroutines implicitly capture this Francesco Zoffoli - Coroutine Patterns and How to Use Them - CppCon0 码力 | 70 页 | 1.45 MB | 6 月前3
Kotlin Language Documentation 1.9.20Compose Multiplatform for Web How to get started Libraries support Feedback Kotlin Native Why Kotlin/Native? Target platforms Interoperability Sharing code between platforms How to get started Kotlin What's new in Kotlin 1.9.20 IDE support New Kotlin K2 compiler updates Kotlin/JVM Kotlin/Native Kotlin Multiplatform Kotlin/Wasm Gradle Standard library Documentation updates Install Kotlin What's new in Kotlin 1.9.0 IDE support New Kotlin K2 compiler updates Language Kotlin/JVM Kotlin/Native Kotlin Multiplatform Kotlin/Wasm Kotlin/JS Gradle Standard library Documentation updates Install0 码力 | 1299 页 | 32.44 MB | 1 年前3
Kotlin 1.2 Language DocumentationDevelopment Using Kotlin for Android Development Kotlin JavaScript Overview Kotlin/Native for Native Coroutines for asynchronous programming and more Multiplatform Programming What's New in Kotlin JavaScript Modules JavaScript Reflection JavaScript DCE Example Native Concurrency in Kotlin/Native Immutability in Kotlin/Native Kotlin/Native libraries 123 128 131 131 133 143 143 145 147 150 Advanced topics Platform libraries Kotlin/Native interoperability Kotlin/Native interoperability with Swift/Objective-C Kotlin/Native Gradle plugin Coroutines Table of contents Coroutine basics Table0 码力 | 333 页 | 2.22 MB | 1 年前3
Kotlin 1.9.10 官方文档 中文版
迁移指南 字符串 集合 可空性 库创建人指南 简介 可读性 可预测性 可调试性 反向兼容性 原生 Kotlin/Native 入门——在 IntelliJ IDEA 中 Kotlin/Native 入门——使用 Gradle Kotlin/Native 入门——使用命令行编译器 与 C 语言互操作 1.10.2.4.1 1.10.2.4.2 1.10.2.4.3 1.10 互操作性 Kotlin/Native 开发 Apple framework——教程 CocoaPods 集成 CocoaPods 概述 添加对 Pod 库的依赖 使用 Kotlin Gradle 项目作为 CocoaPods 依赖项 CocoaPods Gradle 插件 DSL 参考 Kotlin/Native 库 平台库 Kotlin/Native 开发动态库——教程 内存管理器 内存管理器 Kotlin/Native 内存管理 iOS 集成 迁移到新版内存管理器 旧版内存管理器 不可变性与并发 并发概述 并发可变性 并发与协程 调试 Kotlin/Native 1.10.2.12 1.10.2.13 1.10.2.13.1 1.10.2.13.2 1.10.2.13.3 1.10.2.13.4 1.10.3 1.10.3.1 1.10.3.20 码力 | 3753 页 | 29.69 MB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100













