本文做的事
- 使用线程池打印一个参数
代码
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using UnityEngine;
namespace DC
{
public class ThreadPoolDemo : MonoBehaviour
{
private void Start()
{
ThreadPool.QueueUserWorkItem(new WaitCallback(Func), 3);
}
void Func(object param)
{
Debug.Log(param + " is 3");
}
}
}