Professional Documents
Culture Documents
½ Sec.
2 Sec.
--------- O/S Processor
Program1 1 Sec.
---------
Multithreading in . NET
task1()
task2()
Abort
Members of Thread Class
Start() :- To start a particular Thread.
**Sleep(m.sec.) :-To rest a thread for specified duration.
Suspend() :-To halt a thread until explicitly resumed.
Resume() :-To restart execution of a suspended thread.
Abort() :-To stop a running thread execution permanently .
**Currentthread:-Returns the thread currently running.
ThreadState:-Returns the state of the thread-
running,suspended…
Priority:- Specifies a priority of a thread.
SyncLock ("updating_f1.txt")
End SyncLock
End Sub
Thread Class
ThreadStart Delegate
task1()
task2()
ThreadStart ts1=new
Setting Priority to a particular Thread
ThreadStart(task1)
ThreadStart ts2=new
ThreadStart(task2)