⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 threadstate.java

📁 无线通信的主要编程软件,是无线通信工作人员的必备工具,关天相关教程我会在后续传上.
💻 JAVA
字号:
// Copyright (c) Corporation for National Research Initiativespackage org.python.core;import java.util.Stack;public class ThreadState {    //public InterpreterState interp;    public PySystemState systemState;    public PyFrame frame;    //public PyObject curexc_type, curexc_value, curexc_traceback;    //public PyObject exc_type, exc_value, exc_traceback;    public PyException exception;    public Thread thread;    public boolean tracing;    public PyList reprStack = null;    //public PyInstance initializingProxy = null;    private Stack initializingProxies = null;    public int compareStateNesting = 0;    private PyDictionary compareStateDict;    public int recursion_depth = 0;    public PyInstance getInitializingProxy() {        if (initializingProxies == null || initializingProxies.empty()) {            return null;        }        return (PyInstance)initializingProxies.peek();    }    public void pushInitializingProxy(PyInstance proxy) {        if (initializingProxies == null) {            initializingProxies = new Stack();        }        initializingProxies.push(proxy);    }    public void popInitializingProxy() {        if (initializingProxies == null || initializingProxies.empty()) {            throw Py.RuntimeError("invalid initializing proxies state");        }        initializingProxies.pop();    }    public ThreadState(Thread t, PySystemState systemState) {        thread = t;        // Fake multiple interpreter states for now        /*if (Py.interp == null) {          Py.interp = InterpreterState.getInterpreterState();          }*/        this.systemState = systemState;        //interp = Py.interp;        tracing = false;        //System.out.println("new thread state");    }    public boolean enterRepr(PyObject obj) {        //if (reprStack == null) System.err.println("reprStack: null");        //else System.err.println("reprStack: "+reprStack.__len__());        if (reprStack == null) {            reprStack = new PyList(new PyObject[] {obj});            return true;        }        for(int i=reprStack.length-1; i>=0; i--) {            if (obj == reprStack.get(i))                return false;        }        reprStack.append(obj);        return true;    }    public void exitRepr(PyObject obj) {        if (reprStack == null)            return;        for (int i = reprStack.length-1; i>=0; i--) {            if (reprStack.get(i) == obj) {                reprStack.delRange(i, reprStack.length, 1);            }        }    }    public PyDictionary getCompareStateDict() {        if (compareStateDict == null)            compareStateDict = new PyDictionary();        return compareStateDict;    }}

⌨️ 快捷键说明

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