logo
  • 教程列表
  • SO官方文档
  • 线程
    • 同时避免读写数据
    • 创建和启动第二个线程
    • Parallel.ForEach 循环
    • 简单的完整线程演示
    • 死锁(保持资源和等待)
    • 每个处理器创建一个线程
    • 使用任务进行简单的完整线程演示
    • 显式任务平行主义
    • 隐式任务并行
    • 用参数启动一个线程
    • 死锁(两个线程在彼此等待)
  1. StackOverflow 文档
  2. C# Language 教程
  3. 线程
  4. 用参数启动一个线程

用参数启动一个线程

Created: November-22, 2018

使用 System.Threading;

class MainClass {
    static void Main() {
        var thread = new Thread(Secondary);
        thread.Start("SecondThread");
    }

    static void Secondary(object threadName) {
        System.Console.WriteLine("Hello World from thread: " + threadName);
    }
}
  • 死锁(两个线程在彼此等待)
  • 隐式任务并行

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明