aethread.java

来自「java 文件下载器。可自定义」· Java 代码 · 共 76 行

JAVA
76
字号
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   AEThread.java

package org.gudy.azureus2.core3.util;

import java.util.WeakHashMap;

// Referenced classes of package org.gudy.azureus2.core3.util:
//			AEThread2, DebugLight

/**
 * @deprecated Class AEThread is deprecated
 */

public abstract class AEThread extends Thread
{

	private static WeakHashMap our_thread_map = new WeakHashMap();

	public AEThread(String name)
	{
		super(name);
		setDaemon(false);
	}

	public AEThread(String name, boolean daemon)
	{
		super(name);
		setDaemon(daemon);
	}

	public void run()
	{
		try
		{
			runSupport();
		}
		catch (Throwable e)
		{
			DebugLight.printStackTrace(e);
		}
	}

	public abstract void runSupport();

	public static boolean isOurThread(Thread thread)
	{
		if (thread instanceof AEThread)
			return true;
		WeakHashMap weakhashmap = our_thread_map;
		JVM INSTR monitorenter ;
		return our_thread_map.get(thread) != null;
		Exception exception;
		exception;
		throw exception;
	}

	public static void setOurThread()
	{
		setOurThread(Thread.currentThread());
	}

	public static void setOurThread(Thread thread)
	{
		if ((thread instanceof AEThread) || (thread instanceof AEThread2.threadWrapper))
			return;
		synchronized (our_thread_map)
		{
			our_thread_map.put(thread, "");
		}
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?