Looking for efficient semaphore or lock with LIFO ordered list of waiting threads to try to minimize cache and page misses in following implementation of FixedThreadPoolExecutor.
Asked
Active
Viewed 648 times
3
Andriy Plokhotnyuk
- 7,883
- 2
- 44
- 68
-
1Have you done some research? If yes, you may have stumbled upon [`BlockingDeque`](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/BlockingDeque.html), which has implementations... – fge Jun 29 '13 at 12:17
-
I'm not looking for LIFO structure of user data, instead looking for ways how to park/unpark threads efficiently and maintain list of parked threads in LIFO order. – Andriy Plokhotnyuk Jun 29 '13 at 12:21
1 Answers
0
Use a LIFO datastructure, and make thread priorities change dynamically corresponding to the index position of the datastructure.
Rollerball
- 12,618
- 23
- 92
- 161