Returns the arena index for the current thread.
971411
static int index() {
    int probe = UnsafeAccess.UNSAFE.getInt(Thread.currentThread(), PROBE);
    if (probe == 0) {
      ThreadLocalRandom.current(); // force initialization
      probe = UnsafeAccess.UNSAFE.getInt(Thread.currentThread(), PROBE);
    }
    return (probe & ARENA_MASK);
  }
1086691
public SchedulerStats stats() {
		int activeThreads = threadPoolExecutor.getActiveCount();
		return SchedulerStats.of(ThreadPoolStats.of(
			threadPoolExecutor.getCorePoolSize(),
			threadPoolExecutor.getMaximumPoolSize(),
			activeThreads,
			threadPoolExecutor.getPoolSize() - activeThreads,
			threadPoolExecutor.getLargestPoolSize()
		));
	}
300434
def get_current_generator(self):
        """"""
        int_index=int(len(self.generators)*wrap(0,1.0,self.inspect_value('index')))
        return self.generators[int_index]
494071
public int getThreadCount(ThreadGroup group, Status... s) {
        Thread[] threads = getThreads(group);
        int count = 0;
        for (Thread t : threads) {
            if (t instanceof MonitoredThread) {
                Status status = getStatus((MonitoredThread) t);
                if (status != null) {
                    for (Status x : s) {
                        if (x == status) {
                            count++;
                        }
                    }
                }
            }
        }
        return count;
    }
995780
private int defaultThreadID() {
        long tid = Thread.currentThread().getId();
        if (tid < MIN_SEQUENTIAL_THREAD_ID) {
            return (int) tid;
        } else {
            Integer id = threadIds.get();
            if (id == null) {
                id = nextThreadId.getAndIncrement();
                threadIds.set(id);
            }
            return id;
        }
    }
94630
private int getThreadState( Thread.State state ) {
		
		Thread[] threads = getAllThreads();
		int ct = 0;
		
		for( Thread thread : threads ) {
			if (state.equals(thread.getState()) )
				ct++;
		}
		
		return ct;
		
	}
995198
def get_selected_thread(self):
        """"""
        threadlinewidget = self.get_selected_threadline()
        thread = None
        if threadlinewidget:
            thread = threadlinewidget.get_thread()
        return thread
834378
public static int getRunPriority() {
        String s = System.getProperty(RUN_PRIORITY_PROPERTY);
        int priority = Thread.NORM_PRIORITY;
        if (s != null) {
            try {
                priority  = Integer.parseInt(s);
            } catch (NumberFormatException ex) {
                // priority remains Thread.NORM_PRIORITY
            }
        }
        return priority;
    }
859774
def get(self, thread=None, plugin=None):
        
        if plugin is not None:
            if thread is None:
                threads_list = {}
                for key in self.threads.keys():
                    if self.threads[key].plugin == plugin:
                        threads_list[key] = self.threads[key]
                return threads_list
            else:
                if thread in self.threads.keys():
                    if self.threads[thread].plugin == plugin:
                        return self.threads[thread]
                    else:
                        return None
                else:
                    return None
        else:
            if thread is None:
                return self.threads
            else:
                if thread in self.threads.keys():
                    return self.threads[thread]
                else:
                    return None
766398
public int getIndex(TimelineEvent event) {
        int index = -1;

        if (event != null) {
            for (int i = 0; i < events.size(); i++) {
                if (events.get(i).equals(event)) {
                    index = i;

                    break;
                }
            }
        }

        return index;
    }
811452
def getCorner(index,top,left,expand=0,y=206):
    ''' '''
    x = str(-(expand+old_div(ARENA_WIDTH,2))) if left else str(expand+old_div(ARENA_WIDTH,2))
    z = str(-(expand+old_div(ARENA_BREADTH,2))) if top else str(expand+old_div(ARENA_BREADTH,2))
    return 'x'+index+'="'+x+'" y'+index+'="' +str(y)+'" z'+index+'="'+z+'"'
964746
def getThread(self, name):
		
		if not name in self.thread_list:
			self.logger.error("Thread {0} is not registered!".format(name))
			raise Exception("Thread {0} is not registered!".format(name))

		return self.thread_list[name]
626465
@SuppressWarnings("unchecked")
    public final V getIfExists() {
        InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.getIfSet();
        if (threadLocalMap != null) {
            Object v = threadLocalMap.indexedVariable(index);
            if (v != InternalThreadLocalMap.UNSET) {
                return (V) v;
            }
        }
        return null;
    }
1304713
public static final String getThreadId() {
        String id = threadids.get();
        if (null == id) {
            // Pad the tid out to 8 characters
            id = getThreadId(Thread.currentThread());
            threadids.set(id);
        }
        return id;
    }
1291430
function raiseIndex() {
      var length = result.length;
      if (queued) {
        // if queued remove the previous bench and subsequent skipped non-entries
        do {
          ++index > 0 && shift.call(benches);
        } while ((length = benches.length) && !('0' in benches));
      }
      else {
        while (++index < length && !(index in result)) { }
      }
      // if we reached the last index then return `false`
      return (queued ? length : index < length) ? index : (index = false);
    }
641461
def dataframe(self):
        
        if self._points_for is None and self._points_against is None:
            return None
        fields_to_include = {
            'arena': self.arena,
            'boxscore_index': self.boxscore_index,
            'date': self.date,
            'datetime': self.datetime,
            'game': self.game,
            'location': self.location,
            'opponent_abbr': self.opponent_abbr,
            'opponent_conference': self.opponent_conference,
            'opponent_name': self.opponent_name,
            'opponent_rank': self.opponent_rank,
            'overtimes': self.overtimes,
            'points_against': self.points_against,
            'points_for': self.points_for,
            'result': self.result,
            'season_losses': self.season_losses,
            'season_wins': self.season_wins,
            'streak': self.streak,
            'time': self.time,
            'type': self.type
        }
        return pd.DataFrame([fields_to_include], index=[self._boxscore])
1171007
def get_last_thread(self):
        
        cache_key = '_get_last_thread_cache'
        if not hasattr(self, cache_key):
            item = None
            res = self.thread_set.filter(visible=True).order_by('-modified')[0:1]
            if len(res)>0:
                item = res[0]
            setattr(self, cache_key, item)
        return getattr(self, cache_key)