mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
6763959: java.util.concurrent.locks.LockSupport.parkUntil(0) blocks forever
Absolute time 0 needs to return immediately. Reviewed-by: phh, dcubed, dholmes
This commit is contained in:
parent
08b41f30d8
commit
9e4a795ff5
3 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -5837,7 +5837,7 @@ void Parker::park(bool isAbsolute, jlong time) {
|
|||
|
||||
// First, demultiplex/decode time arguments
|
||||
timespec absTime;
|
||||
if (time < 0) { // don't wait at all
|
||||
if (time < 0 || (isAbsolute && time == 0) ) { // don't wait at all
|
||||
return;
|
||||
}
|
||||
if (time > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue