Coroutines Beyond Concurrency by Alex Semin

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 2024
  • Recording brought to you by American Express. americanexpres...
    Kotlin coroutines are most known as an elegant and modern solution for managing asynchronous work. But due to their versatile design, coroutines can also be helpful for tasks outside of concurrency.
    We will deep dive into the implementation of coroutines in Kotlin and learn why their asynchronous execution is not a language feature. Sequence builders and deeply recursive functions from the standard library are prime examples of synchronous coroutines. You will learn how they work and strengthen your understanding of coroutine machinery.
    We will look at the parser combinator library Parsus. It uses coroutines to make parsers debuggable without code generation and process data of arbitrary depth without stack overflow errors. You will learn how to build libraries using similar techniques and how to avoid various pitfalls when working with low-level coroutines APIs.
    Talk by: Alex Semin
    #coroutines #KotlinConf

ความคิดเห็น • 9

  • @Maarttttt
    @Maarttttt ปีที่แล้ว

    Can someone explain what the added value is of using the coroutines mechanism in the parsing library? I could not really understand this portion. Is it more efficient? Good talk overall.

    • @ChrisB_Crisps
      @ChrisB_Crisps ปีที่แล้ว

      I guess the idea was to use coroutines while also avoiding exhausting compute resources when parsing and keeping the symbols. But is not clear to me if that was intended too in the presentation.

  • @forest__fires
    @forest__fires 9 หลายเดือนก่อน

    Hi @Kotlin by JetBrains,
    Glad to reach you!
    I really excited about Coroutines. In that, I'm having one confusion. it's very crucial for me please let me clarify in it.
    If I'm having the CoroutinesScope(Dispatures.Main) and inside that I'm launching 1000 coroutines. in that case its really can archive the 1000 concurrency?
    The cause of the question is, anyway the UI Thread always runs in the Manner of sequentially right. then how it really archive or update to the UI in parallel manner?

    • @Mike_x64
      @Mike_x64 8 หลายเดือนก่อน +1

      Asynchrony does not necessarily mean parallelism. Dispatchers.Main is single-threaded, hence, your coroutines gonna run sequentially: one suspends or finishes-the other one starts or resumes.

  • @avc8484
    @avc8484 ปีที่แล้ว +2

    I have been working as android developer for more than 6 years. but working on kotlin for architectural changes feel very complex. Any suggestions for books or sources?

    • @ChrisB_Crisps
      @ChrisB_Crisps ปีที่แล้ว

      One option is looking for open source applications and collaborating to the project to learn to do things in a different way.

  • @rogeralien
    @rogeralien ปีที่แล้ว

    Thank you so much for this video! It was super useful! 🙏

  • @ferg
    @ferg ปีที่แล้ว +1

    Great talk!

  • @guai9632
    @guai9632 9 หลายเดือนก่อน

    parser combinator looks cool af