src/jdk.jdi/share/classes/com/sun/tools/jdi/EventQueueImpl.java
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 45714 jdk/src/jdk.jdi/share/classes/com/sun/tools/jdi/EventQueueImpl.java@1820d351198d
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package com.sun.tools.jdi;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
45714
1820d351198d 8183012: Code cleanup in com.sun.tools.jdi
clanger
parents: 25859
diff changeset
    28
import java.util.LinkedList;
1820d351198d 8183012: Code cleanup in com.sun.tools.jdi
clanger
parents: 25859
diff changeset
    29
1820d351198d 8183012: Code cleanup in com.sun.tools.jdi
clanger
parents: 25859
diff changeset
    30
import com.sun.jdi.VMDisconnectedException;
1820d351198d 8183012: Code cleanup in com.sun.tools.jdi
clanger
parents: 25859
diff changeset
    31
import com.sun.jdi.VirtualMachine;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
import com.sun.jdi.event.EventQueue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
import com.sun.jdi.event.EventSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
public class EventQueueImpl extends MirrorImpl implements EventQueue {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
     * Note this is not a synchronized list. Iteration/update should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
     * protected through the 'this' monitor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
     */
45714
1820d351198d 8183012: Code cleanup in com.sun.tools.jdi
clanger
parents: 25859
diff changeset
    41
    LinkedList<EventSet> eventSets = new LinkedList<>();
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    TargetVM target;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    boolean closed = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    EventQueueImpl(VirtualMachine vm, TargetVM target) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
        super(vm);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
        this.target = target;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
        target.addEventQueue(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
     * Override superclass back to default equality
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    public boolean equals(Object obj) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        return this == obj;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    public int hashCode() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
        return System.identityHashCode(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
    synchronized void enqueue(EventSet eventSet) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
        eventSets.add(eventSet);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
        notifyAll();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
    synchronized int size() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
        return eventSets.size();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
    synchronized void close() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
        if (!closed) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
            closed = true; // OK for this the be first since synchronized
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
            // place VMDisconnectEvent into queue
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
            enqueue(new EventSetImpl(vm,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
                                     (byte)JDWP.EventKind.VM_DISCONNECTED));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
    public EventSet remove() throws InterruptedException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
        return remove(0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
     * Filter out events not for user's eyes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
     * Then filter out empty sets.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
    public EventSet remove(long timeout) throws InterruptedException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        if (timeout < 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
            throw new IllegalArgumentException("Timeout cannot be negative");
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
        EventSet eventSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        while (true) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
            EventSetImpl fullEventSet = removeUnfiltered(timeout);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
            if (fullEventSet == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
                eventSet = null;  // timeout
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
            /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
             * Remove events from the event set for which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
             * there is no corresponding enabled request (
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
             * this includes our internally requested events.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
             * This never returns null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
             */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
            eventSet = fullEventSet.userFilter();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
            if (!eventSet.isEmpty()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
                break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
        if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
            vm.notifySuspend();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
        return eventSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    EventSet removeInternal() throws InterruptedException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
        EventSet eventSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        do {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
            // Waiting forever, so removeUnfiltered() is never null
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
            eventSet = removeUnfiltered(0).internalFilter();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        } while (eventSet == null || eventSet.isEmpty());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
         * Currently, no internal events are requested with a suspend
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
         * policy other than none, so we don't check for notifySuspend()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
         * here. If this changes in the future, there is much
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
         * infrastructure that needs to be updated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
        return eventSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    private TimerThread startTimerThread(long timeout) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
        TimerThread thread = new TimerThread(timeout);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
        thread.setDaemon(true);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
        thread.start();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
        return thread;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    private boolean shouldWait(TimerThread timerThread) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        return !closed && eventSets.isEmpty() &&
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
               ((timerThread == null) ? true : !timerThread.timedOut());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    private EventSetImpl removeUnfiltered(long timeout)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
                                               throws InterruptedException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
        EventSetImpl eventSet = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
        /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
         * Make sure the VM has completed initialization before
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
         * trying to build events.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
         */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        vm.waitInitCompletion();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        synchronized(this) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
            if (!eventSets.isEmpty()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
                /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
                 * If there's already something there, no need
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
                 * for anything elaborate.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
                 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
                eventSet = (EventSetImpl)eventSets.removeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
            } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
                /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
                 * If a timeout was specified, create a thread to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
                 * notify this one when a timeout
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
                 * occurs. We can't use the timed version of wait()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
                 * because it is possible for multiple enqueue() calls
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
                 * before we see something in the eventSet queue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
                 * (this is possible when multiple threads call
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
                 * remove() concurrently -- not a great idea, but
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
                 * it should be supported). Even if enqueue() did a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
                 * notify() instead of notifyAll() we are not able to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
                 * use a timed wait because there's no way to distinguish
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
                 * a timeout from a notify.  That limitation implies a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
                 * possible race condition between a timed out thread
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
                 * and a notified thread.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
                 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
                TimerThread timerThread = null;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
                try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
                    if (timeout > 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
                        timerThread = startTimerThread(timeout);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
                    while (shouldWait(timerThread)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
                        this.wait();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
                } finally {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
                    if ((timerThread != null) && !timerThread.timedOut()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
                        timerThread.interrupt();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
                if (eventSets.isEmpty()) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
                    if (closed) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
                        throw new VMDisconnectedException();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
                    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
                } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
                    eventSet = (EventSetImpl)eventSets.removeFirst();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        // The build is synchronized on the event set, don't hold
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
        // the queue lock.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        if (eventSet != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
            target.notifyDequeueEventSet();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
            eventSet.build();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
        return eventSet;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    private class TimerThread extends Thread {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        private boolean timedOut = false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
        private long timeout;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        TimerThread(long timeout) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
            super(vm.threadGroupForJDI(), "JDI Event Queue Timer");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
            this.timeout = timeout;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
        boolean timedOut() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
            return timedOut;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        public void run() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
                Thread.sleep(timeout);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
                EventQueueImpl queue = EventQueueImpl.this;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
                synchronized(queue) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
                    timedOut = true;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
                    queue.notifyAll();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
            } catch (InterruptedException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
                // Exit without notifying
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
}