Interface DetectThreadLeak
public interface DetectThreadLeak
-
Method Summary
Modifier and TypeMethodDescriptionstatic DetectThreadLeakCreates an instance ofDetectThreadLeakthat filters threads based on a given predicate.
-
Method Details
-
newThreads
-
of
Creates an instance ofDetectThreadLeakthat filters threads based on a given predicate. This method captures the current state of threads that match the predicate at the time of invocation and provides a way to detect new threads that match the predicate but were not present at the initial capture.- Parameters:
predicate- APredicate<Thread>used to filter threads. Only threads that satisfy the predicate are considered for detection.- Returns:
- An instance of
DetectThreadLeakthat can be used to detect new threads matching the predicate that were not present at the time of this method's invocation. ThenewThreads()method of the returned instance will return a list of new threads that match the predicate and have been started after this method was called.
-