android asynctask - What exactly does thread priority do in Java -


this question has answer here:

i working on android project written in java. have dashboard queries data cloudant database , renders data on graphs. data has processed when received.
have 4 asynctasks process received data in doinbackground override method simultaneously (or supposed to). process being slow, tried line

thread.currentthread().setpriority(thread.max_priority); 

in each asynctask.
however, 4 asynktasks seem happen 1 after other, due changing priority of threads max? when thread priority changed, stop other threads , continue 1 until finishes?

from: https://docs.oracle.com/javase/7/docs/api/java/lang/thread.html

every thread has priority. threads higher priority executed in preference threads lower priority. each thread may or may not marked daemon. when code running in thread creates new thread object, new thread has priority set equal priority of creating thread, , daemon thread if , if creating thread daemon.

(as note: information found searching "java thread.max_priority" in google , looking @ top result)


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -