Simple application of thread pool on the web

zhaozj2021-02-16  53

public class ThreadPoolTest {private void btnModifyPwd_Click (object sender, System.EventArgs e) {AddUserClass addUser = new AddUserClass (); System.Threading.ThreadPool.QueueUserWorkItem (new WaitCallback (AddUserClass.AddUser));}} public class AddUserClass {public static Void AddUser (Object StateObject) {// code}}

Summary: As long as we click on the BTNModifyPWD button, turn off the web page, the program will continue to run, and the method is applied to the large number of update data.

转载请注明原文地址:https://www.9cbs.com/read-19011.html

New Post(0)