This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
vampir
Lets say i have got such code inside class:
ScheduledFuture<?> thread; private void startThread() { thread = ThreadPoolManager.getInstance().schedule(new TestThread(), 5000); } private class TestThread implements Runnable { @Override public void run() { System.out.println(thread.equals(TestThread.this)); } }It prints false to console, any idea to check if saved in var thread is running thread?
13 answers to this question
Recommended Posts