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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -