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

📄 thread.java

📁 无线通信的主要编程软件,是无线通信工作人员的必备工具,关天相关教程我会在后续传上.
💻 JAVA
字号:
// Copyright (c) Corporation for National Research Initiativespackage org.python.modules;import org.python.core.*;class FunctionThread extends Thread{    PyObject func;    PyObject[] args;    PySystemState systemState;    public FunctionThread(PyObject func, PyObject[] args) {        super();        this.func = func;        this.args = args;        this.systemState = Py.getSystemState();    }    public void run() {        Py.setSystemState(systemState);        try {            func.__call__(args);        } catch (PyException exc) {            Py.printException(exc);        }    }}public class thread implements ClassDictInit{    public static PyString __doc__ = new PyString(        "This module provides primitive operations to write multi-threaded "+                "programs.\n" +        "The 'threading' module provides a more convenient interface."    );    public static void classDictInit(PyObject dict) {        dict.__setitem__("LockType", PyJavaClass.lookup(PyLock.class));    }    public static PyObject error = new PyString("thread.error");    public static void start_new_thread(PyObject func, PyTuple args) {        Thread pt = new FunctionThread(func, args.list);        pt.start();    }    public static PyLock allocate_lock() {        return new PyLock();    }    public static void exit() {        exit_thread();    }    public static void exit_thread() {        throw new PyException(Py.SystemExit, new PyInteger(0));    }    public static long get_ident() {        return Py.java_obj_id(Thread.currentThread());    }}

⌨️ 快捷键说明

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