Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8308541

Please add Thread.ofVirtual(Executor) (function which accepts a custom executor)

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      A DESCRIPTION OF THE PROBLEM :
      At the moment, only the Thread.ofVirtual() function exists, which always runs continuations on the internal ForkJoinPool. However, being able to pass in a custom executor opens a very interesting possibilities:

      1. Ability to run continuations on the UI thread, thereby having the possibility of having a long-running UI operation. The operation would be able to block, without obstructing the "UI event queue" to run. Please read more here: https://mvysny.github.io/vaadin-blocking-dialogs/
      2. Ability to create Python-like generators. Prototyped here: https://github.com/mvysny/vaadin-loom/blob/bda351b727dbabe8473718d6da87537e96b33ad6/src/main/java/com/vaadin/starter/skeleton/loom/Iterators.java#L130



      Attachments

        Activity

          People

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: