29package com.jogamp.common.util;
71 return get(java.lang.Thread.currentThread());
81 volatile Throwable interruptSource =
null;
82 volatile int interruptCounter = 0;
83 final Object sync =
new Object();
95 public Thread(
final Runnable target) {
103 public Thread(
final ThreadGroup tg,
final Runnable target) {
112 public Thread(
final ThreadGroup tg,
final Runnable target,
final String name) {
113 super(tg, target, name);
124 public static Thread create(
final ThreadGroup tg,
final Runnable target,
final String name) {
125 return null != name ?
new Thread(tg, target, name) :
new Thread(tg, target);
131 final Throwable r = interruptSource;
141 final int r = interruptCounter;
151 interruptCounter = 0;
152 interruptSource =
null;
159 interruptSource =
new Throwable(getName()+
".interrupt() #"+interruptCounter);
java.lang.Thread specialization implementing InterruptSource to track java.lang.Thread#interrupt() ca...
final int getInterruptCounter(final boolean clear)
Returns the count of java.lang.Thread#interrupt() calls.
Thread(final Runnable target)
See Thread#Thread(Runnable) for details.
Thread(final ThreadGroup tg, final Runnable target, final String name)
See Thread#Thread(ThreadGroup, Runnable, String) for details.
static Thread create(final ThreadGroup tg, final Runnable target, final String name)
Depending on whether name is null, either Thread(ThreadGroup, Runnable, String) or Thread(ThreadGroup...
Thread(final ThreadGroup tg, final Runnable target)
See Thread#Thread(ThreadGroup, Runnable) for details.
Thread()
See Thread#Thread( for details.
final void clearInterruptSource()
Clears source and count of java.lang.Thread#interrupt() calls, if any.
final Throwable getInterruptSource(final boolean clear)
Returns the source of the last interrupt() call.
static InterruptSource currentThread()
Casts current java.lang.Thread to InterruptSource if applicable, otherwise returns null.
Interface exposing java.lang.Thread#interrupt() source, intended for java.lang.Thread specializations...
void clearInterruptSource()
Clears source and count of java.lang.Thread#interrupt() calls, if any.
Throwable getInterruptSource(final boolean clear)
Returns the source of the last interrupt() call.
int getInterruptCounter(final boolean clear)
Returns the count of java.lang.Thread#interrupt() calls.