Java Executors: how can I set task priority?

Currently the only concrete implementations of the Executor interface are the ThreadPoolExecutor and the ScheduledThreadpoolExecutor Instead of using the utility / factory class Executors, you should create an instance using a constructor. You can pass a BlockingQueue to the constructors of the ThreadPoolExecutor. One of the implementations of the BlockingQueue, the PriorityBlockingQueue lets you pass … Read more

What is the ‘realtime’ process priority setting for?

A realtime priority thread can never be pre-empted by timer interrupts and runs at a higher priority than any other thread in the system. As such a CPU bound realtime priority thread can totally ruin a machine. Creating realtime priority threads requires a privilege (SeIncreaseBasePriorityPrivilege) so it can only be done by administrative users. For … Read more