Class VirtualThreadExecutor

  • All Implemented Interfaces:

    public class VirtualThreadExecutor
    extends java.lang.Object
    implements java.util.concurrent.Executor
    An executor that uses a new virtual thread for each task.
    • Constructor Summary

      Constructor Description
      VirtualThreadExecutor​(java.lang.String namePrefix)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(java.lang.Runnable command)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VirtualThreadExecutor

        public VirtualThreadExecutor​(java.lang.String namePrefix)
    • Method Detail

      • execute

        public void execute​(java.lang.Runnable command)
        Specified by:
        execute in interface java.util.concurrent.Executor