2362N/A * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * protected through the 'this' monitor. 0N/A * Override superclass back to default equality 0N/A closed =
true;
// OK for this the be first since synchronized 0N/A // place VMDisconnectEvent into queue 0N/A * Filter out events not for user's eyes. 0N/A * Then filter out empty sets. 0N/A * Remove events from the event set for which 0N/A * there is no corresponding enabled request ( 0N/A * this includes our internally requested events.) 0N/A * This never returns null 0N/A // Waiting forever, so removeUnfiltered() is never null 0N/A * Currently, no internal events are requested with a suspend 0N/A * policy other than none, so we don't check for notifySuspend() 0N/A * here. If this changes in the future, there is much 0N/A * infrastructure that needs to be updated. 0N/A * Make sure the VM has completed initialization before 0N/A * trying to build events. 0N/A synchronized(
this) {
0N/A * If there's already something there, no need 0N/A * for anything elaborate. 0N/A * If a timeout was specified, create a thread to 0N/A * notify this one when a timeout 0N/A * occurs. We can't use the timed version of wait() 0N/A * because it is possible for multiple enqueue() calls 0N/A * before we see something in the eventSet queue 0N/A * (this is possible when multiple threads call 0N/A * remove() concurrently -- not a great idea, but 0N/A * it should be supported). Even if enqueue() did a 0N/A * notify() instead of notifyAll() we are not able to 0N/A * use a timed wait because there's no way to distinguish 0N/A * a timeout from a notify. That limitation implies a 0N/A * possible race condition between a timed out thread 0N/A * and a notified thread. 0N/A // The build is synchronized on the event set, don't hold 0N/A // Exit without notifying