android - run a thread by implementing runnable -



android - run a thread by implementing runnable -

i inquire question running thread in android. can tell me when thread called in situation?

public class photodecoderunnable implements runnable { ... @override public void run() { /* * code want run on thread goes here */ ... } ... }

is thread stand by?

that's not thread, class implements runnable interface. calling run method on instance of photodecoderunnable, result in having code running in context of thread called method itself. thread has constructor takes runnable parameter. calling

thread thread = new thread(new photodecoderunnable()); thread.start();

will spawn new thread.

android multithreading runnable

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -