mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-28 16:50:10 +00:00
8378176: Concurrent GC worker threads may suffer from priority inversion
Reviewed-by: kbarrett, ayang, tschatzl
This commit is contained in:
parent
c64f7357a5
commit
aea8947e9d
@ -33,9 +33,8 @@ ConcurrentGCThread::ConcurrentGCThread() :
|
||||
_should_terminate(false),
|
||||
_has_terminated(false) {}
|
||||
|
||||
void ConcurrentGCThread::create_and_start(ThreadPriority prio) {
|
||||
void ConcurrentGCThread::create_and_start() {
|
||||
if (os::create_thread(this, os::gc_thread)) {
|
||||
os::set_priority(this, prio);
|
||||
os::start_thread(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ private:
|
||||
Atomic<bool> _has_terminated;
|
||||
|
||||
protected:
|
||||
void create_and_start(ThreadPriority prio = NearMaxPriority);
|
||||
void create_and_start();
|
||||
|
||||
virtual void run_service() = 0;
|
||||
virtual void stop_service() = 0;
|
||||
|
||||
@ -210,8 +210,6 @@ WorkerThread::WorkerThread(const char* name_prefix, uint name_suffix, WorkerTask
|
||||
}
|
||||
|
||||
void WorkerThread::run() {
|
||||
os::set_priority(this, NearMaxPriority);
|
||||
|
||||
while (true) {
|
||||
_dispatcher->worker_run_task();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user