java - Why calling a new thread will not work in AsyncTask's doInbackground()? -



java - Why calling a new thread will not work in AsyncTask's doInbackground()? -

while work:

new thread(new classimplementingrunnable(stuff, dostuff()).start();

this not:

new thread(){ public void run(){ log.i("tag", "i within thread"); dostuff(); } };

no error occurs, ignore , wont start seperate thread, "i within thread" not show.

you need phone call start() method on thread inorder create run.

new thread(){ @override public void run(){ log.i("tag", "i within thread"); dostuff(); } }.start();

java android multithreading android-asynctask dalvik

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -