Class VirtualThreadUtils
java.lang.Object
io.awspring.cloud.sqs.VirtualThreadUtils
Utility class for virtual thread detection. Uses reflection to access
Thread.isVirtual() (JDK 21+) while
maintaining compatibility with JDK 17.- Since:
- 4.1.0
- Author:
- Tomaz Fernandes
- See Also:
-
Method Summary
-
Method Details
-
isVirtual
Check whether the given thread is a virtual thread.- Parameters:
thread- the thread to check.- Returns:
trueif the thread is virtual,falseif not or if running on JDK < 21.
-