Package org.glassfish.tyrus.core.virtual
Class VirtualThreadSupport
java.lang.Object
org.glassfish.tyrus.core.virtual.VirtualThreadSupport
Utility class for the virtual thread support.
- 
Method Summary
Modifier and TypeMethodDescriptionstatic LoomishExecutorsallowVirtual(boolean allow, ThreadFactory threadFactory) Return an instance ofLoomishExecutorsbased on a permission to use virtual threads.static booleanInforms whether the givenThreadis virtual. 
- 
Method Details
- 
isVirtualThread
public static boolean isVirtualThread()Informs whether the givenThreadis virtual.- Returns:
 - true when the current thread is virtual.
 
 - 
allowVirtual
Return an instance ofLoomishExecutorsbased on a permission to use virtual threads.- Parameters:
 allow- whether to allow virtual threads.threadFactory- the thread factory to be used by a theExecutorService.- Returns:
 - the 
LoomishExecutorsinstance. 
 
 -