We suppose there are methods run1 () and run2 (), which consume a lot of time. Implementing their synchronous operation will greatly improve the program efficiency. Here we will consider using multi-threaded methods. First, add a reference to define bool type I. The value j is false. [Csharp] using System. Threading; In the function entry, for example, start. [Csharp] void start () {// instantiate the new class to be enabled, Thread thread1 execution method run1 Thread thread1 = new Thread (run1); // instantiate the new class to be enabled, thread thread2 execution method run2 Thread thread2 = new Thread (run2); while (true) // determine whether run1 and run2 are completed {if (I = true & j = true) {break;} else {Thread. sleep (10); // if the method execution is slow, you can add }}to define the methods of run1 and run2 outside [csharp] public void run1 () {// do someting I = true;} public void run2 () {// do someting j = true ;}