mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
6885993: Named Thread: introduce print() and print_on(outputStream* st) methods
Eliminating duplicated code by introducing print_on(outputStream* st) methods in NamedThread Reviewed-by: twisti, coleenp, dholmes
This commit is contained in:
parent
a792009a9f
commit
16a3e2f16d
14 changed files with 14 additions and 62 deletions
|
@ -58,6 +58,9 @@ ConcurrentG1RefineThread(ConcurrentG1Refine* cg1r, ConcurrentG1RefineThread *nex
|
|||
}
|
||||
initialize();
|
||||
create_and_start();
|
||||
|
||||
// set name
|
||||
set_name("G1 Concurrent Refinement Thread#%d", worker_id);
|
||||
}
|
||||
|
||||
void ConcurrentG1RefineThread::initialize() {
|
||||
|
@ -247,12 +250,3 @@ void ConcurrentG1RefineThread::stop() {
|
|||
}
|
||||
}
|
||||
|
||||
void ConcurrentG1RefineThread::print() const {
|
||||
print_on(tty);
|
||||
}
|
||||
|
||||
void ConcurrentG1RefineThread::print_on(outputStream* st) const {
|
||||
st->print("\"G1 Concurrent Refinement Thread#%d\" ", _worker_id);
|
||||
Thread::print_on(st);
|
||||
st->cr();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue