mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
8028280: ParkEvent leak when running modified runThese which only loads classes
Use spin lock to manage ParkEvent and PlatformEvent free lists. Reviewed-by: dholmes, fparain
This commit is contained in:
parent
90a44b778d
commit
edb5dd324e
7 changed files with 95 additions and 112 deletions
|
@ -3486,6 +3486,16 @@ int os::sleep(Thread* thread, jlong ms, bool interruptable) {
|
|||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Short sleep, direct OS call.
|
||||
//
|
||||
// ms = 0, means allow others (if any) to run.
|
||||
//
|
||||
void os::naked_short_sleep(jlong ms) {
|
||||
assert(ms < 1000, "Un-interruptable sleep, short time use only");
|
||||
Sleep(ms);
|
||||
}
|
||||
|
||||
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
|
||||
void os::infinite_sleep() {
|
||||
while (true) { // sleep forever ...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue