1/34
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Thread
This is a class in C#.net that can be found in the System.Threading namespace.
Thread
It is used to create and control threads in a system or application, in which the properties and methods are already provided.
Thread
This is an independent execution unit containing a piece of code. When a process begins, the main thread is started.
Thread
All threads within a process share the same state and memory space and communicate with each other to perform different tasks.
Main Thread
The first thread to be performed in a process is known as the ___ _____.
Child Thread
Threads made using the Thread class are known as ____ ______ of the main thread.
Delegate
When the thread object is created, the _________ will be used to initialize the thread object.
ThreadStart
To define a callback method in the delegate, use __ to execute the code when the thread started.
ThreadStart
A __ delegate represents a method that runs in the Thread class.
Unstarted State
A thread is created within the Common Language Runtime (CLR) but has not started.
Ready State
A thread is ready to run and is waiting for the CPU time.
Running State
A thread is in running mode after invoking its Start method.
WaitSleepJoin State
A running thread is suspended temporarily by invoking either the Sleep method or the monitor's Wait method.
Started State
A suspended thread resumes to _____ _____ when the conditions for which it was suspended are no longer valid.
Blocked State
A thread is blocked when it is waiting for a resource or I/O operations.
Stopped State
A thread has finished its task.
ThreadAbortException
If the thread is aborted, an exception will be thrown named ___.
CurrentThread
It returns the current thread that is running.
IsAlive
It returns a Boolean value indicating the execution status of the recent thread.
IsBackground
It is used to get or set a value that indicates whether the thread is a background thread or not.
Name
It is used to get or set the name of the thread.
Priority
It is used to get or set a value that represents the priority of a thread.
ThreadState
It is used to get the value that contains the states of the recent thread.
public void Abort()
It terminates the thread when calling this method and raises ThreadAbortException in the thread.
public void Interrupt()
It interrupts the thread that is in the state of WaitSleepJoin.
public void Join()
It is used to stop the calling thread until a thread terminates.
public static void ResetAbort()
It is used to withdraw an abort request for the ongoing thread.
public void Start()
It is used to start a thread.
public static void Sleep()
It is used to pause a thread for the stated number in milliseconds.
Multithreading
It is a common feature that allows your application to have more than one (1) execution path at the same time.
Round-robin
In multithreading, the CPU is assigned to each thread for a time slice before moving on to the next thread. In other words, the CPU serves each thread or a given time interval in a ___ fashion.
Race condition
The two (2) child threads (_childThread1 and _childThread2) are gotten from the same resource simultaneously for manipulation, which is known as ____ __.
Unstarted, Ready, Running, WaitSleepJoin, Started, Blocked, Stopped
Thread States: HINT: U R R WSJ S B S
CurrentThread, IsAlive, IsBackground, Name, Priority, ThreadState
Thread Properties: HINT: CT IA IB N P TS
Abort, Interrupt, Join, ResetAbort, Start, Sleep
Thread Methods: HINT: A I J RA S S