android - Java Threading Error IllegalThreadState thread already started -


whenever start thread check. did not find anywhere called start on thread without doing check below

if (!mythread.isalive())     mythread.start(); 

nevertheless, end illegalthreadstateexception : thread started. crashes app (android). there other check need before starting thread?

you should check if thread has started using getstate() , start if state new, otherwise create new thread (if needed).


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -