public interface LoomishExecutors
Executors facade to support virtual threads.| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.ScheduledExecutorService |
getScheduledExecutorService(int nThreads) |
java.util.concurrent.ThreadFactory |
getThreadFactory()
Returns thread factory used to create new threads
|
boolean |
isVirtual()
Return true if the virtual thread use is requested.
|
java.util.concurrent.ExecutorService |
newCachedThreadPool()
Creates a thread pool that creates new threads as needed and uses virtual threads if available.
|
java.util.concurrent.ExecutorService |
newFixedThreadPool(int nThreads)
Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded queue
and uses virtual threads if available
|
java.lang.Thread |
newThread(java.lang.String name,
java.lang.Runnable runnable)
Return new thread.
|
java.util.concurrent.ExecutorService newCachedThreadPool()
java.util.concurrent.ExecutorService newFixedThreadPool(int nThreads)
nThreads - – the number of threads in the pooljava.util.concurrent.ScheduledExecutorService getScheduledExecutorService(int nThreads)
java.util.concurrent.ThreadFactory getThreadFactory()
Executors.defaultThreadFactory()java.lang.Thread newThread(java.lang.String name,
java.lang.Runnable runnable)
boolean isVirtual()
Copyright © 2012–2020 Oracle Corporation. All rights reserved.