using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using ZY.Mes.Service; namespace ZY.Mes.Job { public class JobControl { private readonly ITestService _testService; Task Task1; public JobControl(ITestService testService) { _testService = testService; } public void JobInit() { if(Task1==null) { Task1 = new Task(_testService.PopTestQue); Task1.Start(); } } } }