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
Post a Comment