File tree 1 file changed +14
-1
lines changed
test/hotspot/jtreg/serviceability/sa
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -47,6 +47,19 @@ public static void main(String args[]) {
47
47
objectLock .start ();
48
48
primitiveLock .start ();
49
49
50
+ // Wait until all threads have reached their blocked or timed wait state
51
+ while ((classLock1 .getState () != Thread .State .BLOCKED &&
52
+ classLock1 .getState () != Thread .State .TIMED_WAITING ) ||
53
+ (classLock2 .getState () != Thread .State .BLOCKED &&
54
+ classLock2 .getState () != Thread .State .TIMED_WAITING ) ||
55
+ (objectLock .getState () != Thread .State .TIMED_WAITING ) ||
56
+ (primitiveLock .getState () != Thread .State .TIMED_WAITING )) {
57
+ try {
58
+ Thread .sleep (100 );
59
+ } catch (InterruptedException ex ) {
60
+ }
61
+ }
62
+
50
63
LingeredApp .main (args );
51
64
}
52
65
}
You can’t perform that action at this time.
0 commit comments