So I was going through the internal working of Executor Service, and in the constructor of thread there were these lines mentioned:
Thread(ThreadGroup g, String name, int characteristics, Runnable task,
long stackSize, AccessControlContext acc) {
Thread parent = currentThread();
boolean attached = (parent == this); // primordial or JNI attached
So my question here is, how is it possible that current running thread is equal to the new instance of thread ?
Didn’t find anything about it.