I need an ScheduledThreadPoolExecutor that runs Task according there priority. If 2 or more Task a pending for immediate execution the one with the highest priority must be called first.
Actually there is a solution for ThreadPoolExecutor, but not for ScheduledThreadPoolExecutor, cause it provides no constructor with a BlockingQueue argument.