zoukankan      html  css  js  c++  java
  • c#线程

    ...

    public partial class main_form : Form
    {
        ...{
                ...
                mysub_thread subclass = new mysub_thread(this);
                subthread = new System.Threading.Thread(new System.Threading.ThreadStart(subclass.run));
                subthread.Start();
        }
        class mysub_thread
        {
            private main_form curForm;

            public mysub_thread(main_form tmpForm)
            {
                this.curForm = tmpForm;
            }
            public void run()
            {
                ...
            }
        }

    }

    把主form当作参数传递给子线程,以便子线程调用

  • 相关阅读:
    oracle常用命令
    批量导出docker镜像
    python中的xpath
    __call__, __str__
    闭包
    ORM操作
    nginx跨域请求
    docker-compose命令
    nginx 之 websocket长连接
    nginx--proxy_set_header
  • 原文地址:https://www.cnblogs.com/abinxm/p/1511869.html
Copyright © 2011-2022 走看看