1/33
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Thread class
What is used to create and control threads in a system or application, in which the properties and methods are already provided?
System.Threading namespace
Thread is a class in C#.NET that can be found in what namespace?
Thread class
What is the independent execution unit containing a piece of code?
Threads
All […] within a process share the same state and memory space and communicate with each other to perform different tasks.
Main Thread
When using the Thread class, what is the first thread to be performed in a process?
Child Thread
The other threads that are made using the Thread class are known as the […] of the main thread.
Child Thread
Creating a […] for the main thread should write or create a delegate object, passing a callback method to it as a parameter.
Delegate
When the thread object is created, what should be used to initialize that thread object?
ThreadStart
To define a callback method in the delegate, what should be used to execute the code when the thread started?
Unstarted
Ready
Running
WaitSleepJoin
Started
Blocked
Stopped
List down the Thread States:
Unstarted
What state is it when a thread is created within the CLR but has not started?
Ready
What state is it when a thread is ready to run and is waiting for the CPU time?
Running
What state is it when a thread is in running mode after invoking its Start method?
WaitSleepJoin
What state is it when a running thread is suspended temporarily by invoking either the Sleep method or the monitor’s Wait method?
Started
What state is it when a suspended thread resumes to Started state when the conditions for which is it was suspended are no longer valid?
Blocked
What state is when a thread is blocked when it is waiting for a resource or I/O operations?
Stopped
What state is it when a thread has finished its task?
ThreadAbortException
If the thread is aborted, what exception will be thrown?
CurrentThread
IsAlive
IsBackground
Name
Priority
ThreadState
List down Thread class’s properties:
CurrentThread
Which returns the current thread that is running?
IsAlive
Which returns a Boolean value indicating the execution status of the recent thread?
IsBackground
Which is used to get or set a value that indicates whether the thread is a background thread or not?
Name
Which is used to get or set the name of the thread?
Priority
Which is used to get or set a value that represents the priority of a thread?
ThreadState
Which is used to get the value that contains the states of the recent thread?
public void Abort()
public void Interrupt()
public void Join()
public static void ResetAbort()
public void Start()
public static void Sleep()
List down Thread class’ methods:
public void Abort()
What terminates the thread when calling this method and raises ThreadAbortException in the thread?
public void Interrupt()
What interrupts the thread that is in the state of WaitSleepJoin?
public void Join()
What is used to stop the calling thread until a thread terminates?
public static void ResetAbort()
What is used to withdraw an abort request for the ongoing thread?
public void Start()
What is used to start a thread?
public static void Sleep()
What is used to pause a thread for the stated number in milliseconds?
Multithreading
In OS, what is the common feature that allows your application to have more than one execution path at the same time?
Multithreading
In […], the CPU is assigned to each thread for a time slice before moving on to the next thread.