Coroutines in Kotlin## Coroutines in Kotlin Andrey.Breslav@JetBrains.com This talk could have been named... • async/await/yield • fibers Suspendable Computations • [stackless] continuations ## Outline • Motivation/Examples Motivation/Examples • Solutions in other languages • Kotlin's Solution – Client code – Library code • Compiling Coroutines • Exception Handling • Appendix. Serializable Coroutines? ## “Legal” • All I’m |---|---|---| |Language restrictions|Use in special contexts 😢|Use anywhere 😢| |Implemented in|C#, Scala, Kotlin, ...|Quasar, Javaflow, ...| |Code transformation|Local (compiler magic) 😢|All over the place 😢|0 码力 | 39 页 | 1.01 MB | 2 年前3
Kotlin 1.9.10 官方文档 中文版png) ## Kotlin 官方文档中文版 ## 目录 关于本书 1.1 文档 1.1.1 入门 1.2 Kotlin 之旅 1.3 概述 1.4 Kotlin 多平台 1.4.1 Kotlin 用于服务器端开发 1.4.2 Kotlin 用于 Android 开发 1.4.3 Kotlin Wasm 1.4.4 Kotlin 原生 1.4.5 Kotlin 用于 JavaScript 4.6 Kotlin 用于数据科学 1.4.7 Kotlin 用于竞技程序设计 1.4.8 Kotlin 的新特性 1.5 Kotlin 1.9.0 1.5.1 Kotlin 1.9.20-RC 1.5.2 早期版本 1.5.3 Kotlin 1.8.20 1.5.3.1 Kotlin 1.8.0 1.5.3.2 Kotlin 1.7.20 1.5.3.3 Kotlin 1.7.0 3.4 Kotlin 1.6.20 1.5.3.5 Kotlin 1.6.0 1.5.3.6 Kotlin 1.5.30 1.5.3.7 Kotlin 1.5.20 1.5.3.8 Kotlin 1.5.0 1.5.3.9 Kotlin 1.4.30 1.5.3.10 Kotlin 1.4.20 1.5.3.11 Kotlin 1.4.0 1.5.3.12 Kotlin 1.3 10 码力 | 3753 页 | 29.69 MB | 2 年前3
基于Consul的多Beats接入管控与多ES搜索编排## 基于Consul的多Beats接入管控与多ES搜索编排 梁成 腾讯云, barryliang@tencent.com ## 拥抱开源、释放云原生的力量 背景与挑战 多Beats/Logstash接入管控 多ES搜索编排系统 日志AIOps探索 ## 背景与挑战 如何降低日志接入门槛 如何保证日志实时上报 如何保障日志采集不影响业务 如何做配置标准化 如何帮助业务快速排障 如何帮助业务快速排障 如何提供方便便捷的性能分析调优能力 100+ 产品数量 ## 1000 人员规模 10000 主机规模 ## 多Beats/Logstash接入 管控 提供多产品接入管理,多beats标准化、界面化、自动化的日志接入方案 ## 案例:1000+业务10000+台 主机如何快速实现日志接入? 业务规模 1000+业务、10000+业务主机、每天百T日志增量 日志需求 收集业务日志文件用于故障分析与告警监控 从Consul中获取当前agent的配置组列表,并启动多个采集进程 ## 配置变更感知 watch到Consul对应的agent id路径,实时感知配置变化,并对启动的进程列表做重启清理等工作 管理多Beats/logstash Beats等以agent子进程启动其管理这些进程的 cpu/内存等资源  } ## SAM conversion runAction(Action action) { action.run(); } Kotlin: runAction { println("I'm Kotlin 1.3") } ## SAM conversion for a Kotlin interface Java: Kotlin: interface Action { fun run() } fun0 码力 | 69 页 | 3.29 MB | 2 年前3
Kotlin 1.2 Language Documentationp1_1.jpg) Kotlin Language Documentation ## Table of Contents Overview ..... 5 Using Kotlin for Server-side Development ..... 5 Using Kotlin for Android Development ..... 7 Kotlin JavaScript Overview Overview ..... 8 Kotlin/Native for Native ..... 9 Coroutines for asynchronous programming and more ..... 11 Multiplatform Programming ..... 12 What's New in Kotlin 1.1 ..... 14 What's What's New in Kotlin 1.2 ..... 23 What's Coming in Kotlin 1.3 ..... 29 Standard library ..... 33 Tooling ..... 35 Getting Started ..... 36 Basic Syntax ..... 36 Idioms ..... 42 Coding Conventions0 码力 | 333 页 | 2.22 MB | 2 年前3
A Security Guide for Kotlin Developers## A Security Guide for Kotlin Developers  Overview.....1 Kotlin's Security Profile.....2 Most Common Security Attacks Attacks.....3 Top Kotlin Security Risk.....5 OWASP Mobile TOP 10 Mobile Risks.....10 Protect Your Kotlin Programs with Kiuwan.....11 A pragmatic, modern, and statically typed coding language that's essentially a Java alternative, Kotlin offers some key benefits for Java Virtual Machine (JVM) and Android app development while also being interoperable alongside Java. Kotlin language is general purpose0 码力 | 13 页 | 1.80 MB | 2 年前3
Kotlin Language Documentation 1.3Kotlin Language Documentation ## Table of Contents Overview ..... 7 .Using Kotlin for Server-side Development ..... 7 Using Kotlin for Android Development ..... 9 .Kotlin JavaScript Overview Overview ..... 11 .Kotlin/Native for Native ..... 13 Kotlin for Data Science ..... 15 .Coroutines for asynchronous programming and more ..... 20 Multiplatform Programming ..... 21 What's What's New in Kotlin 1.1 ..... 24 What's New in Kotlin 1.2 ..... 35 What's New in Kotlin 1.3 ..... 44 Standard library ..... 50 Tooling ..... 52 Getting Started ..... 530 码力 | 597 页 | 3.61 MB | 2 年前3
Kotlin Language Documentation 1.9.201a/p1_1.jpg) Kotlin Language Documentation 1.9.20 ## Table of Contents Kotlin Docs 61 Get started with Kotlin 61 Install Kotlin 61 Create your powerful application with Kotlin 61 Is anything anything missing? 63 Welcome to our tour of Kotlin! 63 Hello world 63 Variables 64 String templates 64 Practice 65 Next step 65 Basic types 65 Practice 66 Next step 67 Collections 67 List What's next? ..... 90 Kotlin Multiplatform ..... 90 Kotlin Multiplatform use cases ..... 91 Code sharing between platforms ..... 91 Get started ..... 92 Kotlin for server side ..... 920 码力 | 1299 页 | 32.44 MB | 2 年前3
Kotlin 入门学习笔记整理修饰的静态变量的字符串,是个编译器常量(编译器编译的时候,已经确定并且不可改变的) private static final String LALALA = "lalala"; ## kotlin 中的表示方式 companion object { const val LALALA = "lalala" 3 } ## 定义变量 变量名后“:”跟着他的类型,类型可以省略掉 (lesson : Lesson in lessonList){ 3 } ## 创建对象(直接调用构造器) java: Java = Java() 返回值 java void kotlin Unit ## kotlin 的类型推断 1 // 数据类型 首字母大写 2 var age: Int = 18 3 // 因为类型推断,基本数据类型可以省略 4 var age = 18 ## 修饰符 也是用 class ## 静态内部类 java 中 用 static 修饰;静态内部类可以写静态函数 kotlin 静态内部类是没有关键字修饰; ## 嵌套内部类 不用 static 修饰的话默认的内部类就是嵌套内部类,嵌套内部类可以获取外部类的引用,不可以写静态函数;kotlin 嵌套内部类是有关键字修饰,用 inner 修饰 ## 实现接口 实现接口和继承都是没有关键字,实现接口0 码力 | 8 页 | 5.41 MB | 2 年前3
Hello 算法 1.1.0 Kotlin版FELLO FELLO FELLO FELLO FELLO FELLO >Hello算法 动画图解、一键运行的数据结构与算法教程 靳宇栋 (@krahets) ## Hello 算法 Kotlin 语言版 作者:靳宇栋 (@krahets) 代码审阅:陈东辉 (@curtishd) 












