Java |
To make a thread sleep:
Thread.sleep(1000);
To create a thread:
Make a class extend Thread class or
implement Runnable interface:
Thread athread = new Thread(that_class);
To start a thread:
athread.start();
To kill a thread:
athread = null;
To interrupt a thread;
athread.stop();
|
|
C# |
To make a thread sleep:
Thread.Sleep(1000);
To create a thread:
Code a protected method.
Thread athread = new Thread(new ThreadStart(that_method));
To start a thread:
athread.Start();
To kill a thread:
athread.Abort();
To interrupt a thread:
athread.Interrupt();
|
|