java - For a shared resource accessed by two threads, how to arrange priority? -


is there way give 1 thread priority on when accessing resource?

no, , speaking: makes no sense. unless both threads try ressource @ same time (very rare) priority wont help, unless th thread higher priority can "steal" ressource in use.

basically can never have more 1 item waiting, use priority? 3+ threads makes logical sense, 2 without benefit.


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 -