diff options
author | tomee <none@none> | 2006-05-17 14:22:40 -0700 |
---|---|---|
committer | tomee <none@none> | 2006-05-17 14:22:40 -0700 |
commit | 43fb4b48d7d5ba4ce77cb215445844e34af5848b (patch) | |
tree | e34007d8b7894624d5117410eb42dd11babcb6be /usr/src/lib/libdtrace_jni | |
parent | 8faf39b2acc8bb704a9e83f06961b8f0a7f060d2 (diff) | |
download | illumos-gate-43fb4b48d7d5ba4ce77cb215445844e34af5848b.tar.gz |
6426129 abort() after close() throws NoSuchElementException
Diffstat (limited to 'usr/src/lib/libdtrace_jni')
-rw-r--r-- | usr/src/lib/libdtrace_jni/java/src/org/opensolaris/os/dtrace/LocalConsumer.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr/src/lib/libdtrace_jni/java/src/org/opensolaris/os/dtrace/LocalConsumer.java b/usr/src/lib/libdtrace_jni/java/src/org/opensolaris/os/dtrace/LocalConsumer.java index 7cc72a019c..c6a1f41dad 100644 --- a/usr/src/lib/libdtrace_jni/java/src/org/opensolaris/os/dtrace/LocalConsumer.java +++ b/usr/src/lib/libdtrace_jni/java/src/org/opensolaris/os/dtrace/LocalConsumer.java @@ -157,6 +157,7 @@ public class LocalConsumer implements Consumer { private State state = State.INIT; private boolean stopCalled; + private boolean abortCalled; // // Per-consumer lock used in native code to prevent conflict between @@ -307,6 +308,10 @@ public class LocalConsumer implements Consumer { state = State.OPEN; setOptions(DEFAULT_OPTIONS); + if (abortCalled) { + _interrupt(); + } + if (logger.isLoggable(Level.INFO)) { logger.info("consumer table count: " + _openCount()); } @@ -846,10 +851,13 @@ public class LocalConsumer implements Consumer { } } - public void + public synchronized void abort() { - _interrupt(); + if ((state != State.INIT) && (state != State.CLOSED)) { + _interrupt(); + } + abortCalled = true; } /** |