Hi,
there is currently a discussion on github about the addition of a low level
utility class which helps to retrieve Threads [1]. The latest proposal is to
implement a predicate based approach for filtering threads [2]. My opinion is,
that we should not add such an API at all, because we would have to revert it
anyway, when we upgrade [lang] to Java 8. Further more I don't think it is a
good idea to add a generic Pedicate interface to [lang]. This will only cause
confusion for users already using Java 8. So if we really want to add predicate
based API in ThreadUtils, it should IMHO Look like this:
Collection<Thread> ThreadUtils.findThreads(ThreadPredicate filter)
public interface ThreadPredicate {
boolean test(Thread);
}
Later we can change this to:
Collection<Thread> ThreadUtils.findThreads(java.util.function.Predicate<Thread>
filter)
public interface ThreadPredicate extends java.util.function.Predicate<Thread>
I'd like to hear what others think about this.
Regards,
Benedikt
[1] https://github.com/apache/commons-lang/pull/61
[2] https://github.com/salyh/commons-lang/pull/1
Send from my mobile device
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]