The idea of Runnable is that it is a consolidated piece of code that can be executed by something else inside any context that it selects (in this case, a thread). The second thread will call the run() method when it starts, so you can have a call to foo() in your MyClass.run() method. You cannot arbitrarily decide, from the main thread, that the second thread is now going to abandon everything that it did in the run() method, and start working with foo() .
source share