JEP Explained. JEP 480: Structured Concurrency

Поделиться
HTML-код
  • Опубликовано: 19 янв 2025

Комментарии • 12

  • @Olekj
    @Olekj 4 месяца назад

    "Scheduling runnables is like goto" love this!

  • @Virus00000000000001
    @Virus00000000000001 4 месяца назад

    it's so relaxing listening to him

  • @eddymoreno5624
    @eddymoreno5624 4 месяца назад

    Great talk, i did not think in the debug part, amazing

  • @face-it
    @face-it Месяц назад

    What if we want to shut down once a certain number of subtasks have succeeded-say, after 1,000 tasks have successfully completed-rather than waiting for all of them? Is there a mechanism within structured concurrency to handle this scenario?

  • @pavelpetrashov2975
    @pavelpetrashov2975 4 месяца назад +1

    Actually, there's kind of goto in java
    outerLoop:
    for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 10; j++) {
    if (someCondition) {
    break outerLoop; // This breaks out of both loops
    }
    }
    }

  • @FabienHerman
    @FabienHerman 3 месяца назад

    so it's like coroutines then ?!

  • @ዕንባቆም
    @ዕንባቆም 4 месяца назад

    I need another person explaining this other than this lady.

  • @MaxDanilkin
    @MaxDanilkin 4 месяца назад +1

    This is terrible api, seriously. Reactor implemented all that functionality a while ago in a much better way.

    • @sandrodelacruz8125
      @sandrodelacruz8125 4 месяца назад +1

      Project Reactor? Like RxJava? Reactive programming as a paradigm doesnt scale all that well and leads to confusing code. There's a reason it didnt take off. Developers like imperative programming style. Think of this as similar to Kotlins coroutines.

    • @andreyv116
      @andreyv116 4 месяца назад

      Continuations has the massive benefit of not coloring functions. This is not the case with the Reactive or Flow (or futures or suspend)

    • @andreyv116
      @andreyv116 4 месяца назад

      ​@@sandrodelacruz8125this is better than Kotlin's coroutines in that it doesn't color functions