public async void JobTest() { TestjobGet1 testjobGet1 = new TestjobGet1(); testjobGet1.i = 2; var tr = await TaskCore.Run(testjobGet1); Console.WriteLine(tr); Console.WriteLine(Thread.CurrentThread.ManagedThreadId); }
public void BeginReceiveCallback(IAsyncResult ar) { i++; UDP_Data_Receive_Component uDP_Data_ = (UDP_Data_Receive_Component)ar.AsyncState; var dd = uDP_Data_.UDP_Server.EndReceive(ar, ref uDP_Data_.EndPoint); Console.WriteLine(i); var udpd = UDPComponentPool.UDPDataComponent(UDP_Service); UDP_Service.BeginReceive(BeginReceiveCallback, uDP_Data_); UDPtask uDPtask = new UDPtask { stream = Save_stream, UDP_Data_ = dd }; TaskCore.Run(uDPtask); }
public static async Task SendNewVerifyMailAsync() { VerifyeMail verifyeMail = new VerifyeMail("验证码", CSharpTools.CreateUUID().ToString(), "", null, "*****@*****.**"); await TaskCore.Run(verifyeMail); }