SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
V.SAKTHIPRIYA
II-MSC(IT)
NADAR SARASWATHI COLLEGE OF ARTS AND SCIENCE
INTRODUCTION:
 Multithreading enables your Visual Basic program to
perform concurrent processing so that you can do more
than one operation at a time happening is that is divided
by the computer into slices, and start a new thread ,that
thread gets some time slices which means that threads
code can execute.
 Visual Basic program to perform concurrent processing so
that you can do more than one operation at a time.
THREAD PROPERTIES:
 Threads enable your program to perform concurrent
processing.
 The .NET Framework System. Threading namespace
makes using threads easier.
 Threads share the application's resources. For more
information, see Using Threads and
Threading.
CREATING A THREAD:
 create a new thread by declaring a variable of type Thread
and calling the constructor, providing the name of the
procedure or method that you want to execute on the new
thread.
Dim newThread As New
System.Threading.Thread(AddressOf AMethod)
STARTING A THREAD:
 To start the execution of a new thread, use the Start
method, as shown in the following code
newThread.Start()
STOPPING A THREAD
 To stop the execution of a thread, use the Abort method, as
shown in the following code.
newThread.Abort()
 Besides starting and stopping threads, you can also pause
threads by calling the Sleep or Suspend method, resume a
suspended thread by using the Resume method, and
destroy a thread by using the Abort method
THREAD METHODS:
METHOD ACTION
Start Causes a thread to start to run.
sleep Pauses a thread for a specified time
suspend Pauses a thread when it reaches a safe point.
abort Stops a thread when it reaches a safe point.
resume Restarts a suspended thread
join Causes the current thread to wait for another thread
to finish. If used with a time-out value, this method
returns True if the thread finishes in the allocated
THREAD PROPERTIES:
PROPERTY VALUE
IsAlive Contains the value True if a thread is active
IsBackground Gets or sets a Boolean that indicates if a thread is or should be a
background thread. Background threads are like foreground
threads, but a background thread does not prevent a process
from stopping. Once all foreground threads that belong to a
process have stopped, the common language runtime ends the
process by calling the Abort method on background threads
that are still alive.
CON…
Name Gets or sets the name of a thread.
Most frequently used to discover
individual threads when you
debug.
Priority Gets or sets a value that is used by the
operating system to prioritize thread
scheduling.
Thread state Contains a value that describes a
thread's state or states.
SETTING A THREAD’S PRIORITY
 Threads are scheduled for execution based on their
priority.
 Above normal-gives a thread higher priority.
 Below normal-gives a thread lower priority.
 Highest-gives a thread highest priority.
 Lowest-gives a thread lowest priority.
 Normal-gives a thread average priority.
DETERMINING THREAD STATE
 The thread state property gives you information about the
status of a thread.
 Initialized-the thread was initialized , but it hasn’t started.
 Ready- the thread is ready.
 Running-the thread is running.
 Standby-the thread is on standby.
 Terminated-the thread has terminated.
 Transition-the thread is in transition between two states.
 Unknown-the thread state is unknown.
 Wait-the thread is waiting.

More Related Content

PPT
Intro To .Net Threads
PPT
Threads c sharp
PPT
Multithreading Presentation
PPTX
Multithreading
PPTX
Multi threading
PPTX
Thread priorities
PPTX
Intro To .Net Threads
Threads c sharp
Multithreading Presentation
Multithreading
Multi threading
Thread priorities

What's hot (20)

PPTX
Multithreading in java
PPTX
Multi-Threading
PPTX
Chap3 multi threaded programming
PPTX
18 concurrency
PPTX
Threads (operating System)
PPT
Thread model in java
PPTX
PPTX
Introduction to TPL
PPTX
Multithreaded programming
PPT
Python session.11 By Shanmugam
PPTX
Multi threading
PPT
Thread 1
PPTX
Java concurrency - Thread pools
PPTX
PDF
Multithreading
PPT
Threads in java
PDF
اسلاید ارائه اول جلسه ۱۰ کلاس پایتون برای هکر های قانونی
PPTX
Multithreading.
PPTX
Lecture 23-24.pptx
PPTX
Getting to Know the Cassandra Codebase
Multithreading in java
Multi-Threading
Chap3 multi threaded programming
18 concurrency
Threads (operating System)
Thread model in java
Introduction to TPL
Multithreaded programming
Python session.11 By Shanmugam
Multi threading
Thread 1
Java concurrency - Thread pools
Multithreading
Threads in java
اسلاید ارائه اول جلسه ۱۰ کلاس پایتون برای هکر های قانونی
Multithreading.
Lecture 23-24.pptx
Getting to Know the Cassandra Codebase
Ad

Similar to Multithreading (20)

PPTX
Threading
PDF
Sync, async and multithreading
PPT
Threads and Synchronization in c#
PPT
Threads And Synchronization in C#
PPTX
Multithreading in java
PPT
Java And Multithreading
DOCX
Threadnotes
PDF
CSE 3146 M1- MULTI THREADING USING JAVA .pdf
PPT
Introto netthreads-090906214344-phpapp01
PDF
Multi threading
PPTX
OOPS object oriented programming UNIT-4.pptx
PDF
Intake 38 12
PPTX
.NET Multithreading/Multitasking
DOCX
Module - 5 merged.docx notes about engineering subjects java
PDF
Concurrency and parallel in .net
PDF
Multithreading Introduction and Lifecyle of thread
PPTX
MSBTE Computer Engineering JPR java. multi. threading.pptx
PDF
Unit-3 MULTITHREADING-2.pdf
PPTX
Thread Concept.pptx
PPTX
multithreading,thread and processinjava-210302183809.pptx
Threading
Sync, async and multithreading
Threads and Synchronization in c#
Threads And Synchronization in C#
Multithreading in java
Java And Multithreading
Threadnotes
CSE 3146 M1- MULTI THREADING USING JAVA .pdf
Introto netthreads-090906214344-phpapp01
Multi threading
OOPS object oriented programming UNIT-4.pptx
Intake 38 12
.NET Multithreading/Multitasking
Module - 5 merged.docx notes about engineering subjects java
Concurrency and parallel in .net
Multithreading Introduction and Lifecyle of thread
MSBTE Computer Engineering JPR java. multi. threading.pptx
Unit-3 MULTITHREADING-2.pdf
Thread Concept.pptx
multithreading,thread and processinjava-210302183809.pptx
Ad

More from GowriLatha1 (20)

PPTX
Filtering in frequency domain
PPTX
Demand assigned and packet reservation multiple access
PPTX
Software engineering
PPTX
Shadow paging
PPTX
PPTX
Web services & com+ components
PPTX
Comparison with Traditional databases
PPTX
Recovery system
PPTX
Comparison with Traditional databases
PPTX
Static analysis
PPTX
Hema dm
PPTX
Data reduction
PPTX
Inter process communication
PPTX
computer network
PPTX
Operating System
PPTX
Data mining query language
PPTX
Enterprice java
PPTX
Ethernet
PPTX
Java script
PPTX
Path & application(ds)2
Filtering in frequency domain
Demand assigned and packet reservation multiple access
Software engineering
Shadow paging
Web services & com+ components
Comparison with Traditional databases
Recovery system
Comparison with Traditional databases
Static analysis
Hema dm
Data reduction
Inter process communication
computer network
Operating System
Data mining query language
Enterprice java
Ethernet
Java script
Path & application(ds)2

Recently uploaded (20)

PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Trump Administration's workforce development strategy
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
Classroom Observation Tools for Teachers
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
Complications of Minimal Access Surgery at WLH
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Introduction to Building Materials
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Lesson notes of climatology university.
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
A systematic review of self-coping strategies used by university students to ...
Trump Administration's workforce development strategy
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
UNIT III MENTAL HEALTH NURSING ASSESSMENT
A powerpoint presentation on the Revised K-10 Science Shaping Paper
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Classroom Observation Tools for Teachers
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Complications of Minimal Access Surgery at WLH
History, Philosophy and sociology of education (1).pptx
Introduction to Building Materials
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Lesson notes of climatology university.

Multithreading

  • 2. INTRODUCTION:  Multithreading enables your Visual Basic program to perform concurrent processing so that you can do more than one operation at a time happening is that is divided by the computer into slices, and start a new thread ,that thread gets some time slices which means that threads code can execute.  Visual Basic program to perform concurrent processing so that you can do more than one operation at a time.
  • 3. THREAD PROPERTIES:  Threads enable your program to perform concurrent processing.  The .NET Framework System. Threading namespace makes using threads easier.  Threads share the application's resources. For more information, see Using Threads and Threading.
  • 4. CREATING A THREAD:  create a new thread by declaring a variable of type Thread and calling the constructor, providing the name of the procedure or method that you want to execute on the new thread. Dim newThread As New System.Threading.Thread(AddressOf AMethod)
  • 5. STARTING A THREAD:  To start the execution of a new thread, use the Start method, as shown in the following code newThread.Start()
  • 6. STOPPING A THREAD  To stop the execution of a thread, use the Abort method, as shown in the following code. newThread.Abort()  Besides starting and stopping threads, you can also pause threads by calling the Sleep or Suspend method, resume a suspended thread by using the Resume method, and destroy a thread by using the Abort method
  • 7. THREAD METHODS: METHOD ACTION Start Causes a thread to start to run. sleep Pauses a thread for a specified time suspend Pauses a thread when it reaches a safe point. abort Stops a thread when it reaches a safe point. resume Restarts a suspended thread join Causes the current thread to wait for another thread to finish. If used with a time-out value, this method returns True if the thread finishes in the allocated
  • 8. THREAD PROPERTIES: PROPERTY VALUE IsAlive Contains the value True if a thread is active IsBackground Gets or sets a Boolean that indicates if a thread is or should be a background thread. Background threads are like foreground threads, but a background thread does not prevent a process from stopping. Once all foreground threads that belong to a process have stopped, the common language runtime ends the process by calling the Abort method on background threads that are still alive.
  • 9. CON… Name Gets or sets the name of a thread. Most frequently used to discover individual threads when you debug. Priority Gets or sets a value that is used by the operating system to prioritize thread scheduling. Thread state Contains a value that describes a thread's state or states.
  • 10. SETTING A THREAD’S PRIORITY  Threads are scheduled for execution based on their priority.  Above normal-gives a thread higher priority.  Below normal-gives a thread lower priority.  Highest-gives a thread highest priority.  Lowest-gives a thread lowest priority.  Normal-gives a thread average priority.
  • 11. DETERMINING THREAD STATE  The thread state property gives you information about the status of a thread.  Initialized-the thread was initialized , but it hasn’t started.  Ready- the thread is ready.  Running-the thread is running.  Standby-the thread is on standby.  Terminated-the thread has terminated.  Transition-the thread is in transition between two states.  Unknown-the thread state is unknown.  Wait-the thread is waiting.