04. Threads

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/33

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:03 PM on 10/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

34 Terms

1
New cards

Thread class

What is used to create and control threads in a system or application, in which the properties and methods are already provided?

2
New cards

System.Threading namespace

Thread is a class in C#.NET that can be found in what namespace?

3
New cards

Thread class

What is the independent execution unit containing a piece of code?

4
New cards

Threads

All […] within a process share the same state and memory space and communicate with each other to perform different tasks.

5
New cards

Main Thread

When using the Thread class, what is the first thread to be performed in a process?

6
New cards

Child Thread

The other threads that are made using the Thread class are known as the […] of the main thread.

7
New cards

Child Thread

Creating a […] for the main thread should write or create a delegate object, passing a callback method to it as a parameter.

8
New cards

Delegate

When the thread object is created, what should be used to initialize that thread object?

9
New cards

ThreadStart

To define a callback method in the delegate, what should be used to execute the code when the thread started?

10
New cards
  1. Unstarted

  2. Ready

  3. Running

  4. WaitSleepJoin

  5. Started

  6. Blocked

  7. Stopped


List down the Thread States:

11
New cards

Unstarted

What state is it when a thread is created within the CLR but has not started?

12
New cards

Ready

What state is it when a thread is ready to run and is waiting for the CPU time?

13
New cards

Running

What state is it when a thread is in running mode after invoking its Start method?

14
New cards

WaitSleepJoin

What state is it when a running thread is suspended temporarily by invoking either the Sleep method or the monitor’s Wait method?

15
New cards

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?

16
New cards

Blocked

What state is when a thread is blocked when it is waiting for a resource or I/O operations?

17
New cards

Stopped

What state is it when a thread has finished its task?

18
New cards

ThreadAbortException

If the thread is aborted, what exception will be thrown?

19
New cards
  1. CurrentThread

  2. IsAlive

  3. IsBackground

  4. Name

  5. Priority

  6. ThreadState


List down Thread class’s properties:

20
New cards

CurrentThread

Which returns the current thread that is running?

21
New cards

IsAlive

Which returns a Boolean value indicating the execution status of the recent thread?

22
New cards

IsBackground

Which is used to get or set a value that indicates whether the thread is a background thread or not?

23
New cards

Name

Which is used to get or set the name of the thread?

24
New cards

Priority

Which is used to get or set a value that represents the priority of a thread?

25
New cards

ThreadState

Which is used to get the value that contains the states of the recent thread?

26
New cards
  1. public void Abort()

  2. public void Interrupt()

  3. public void Join()

  4. public static void ResetAbort()

  5. public void Start()

  6. public static void Sleep()


List down Thread class’ methods:

27
New cards

public void Abort()

What terminates the thread when calling this method and raises ThreadAbortException in the thread?

28
New cards

public void Interrupt()

What interrupts the thread that is in the state of WaitSleepJoin?

29
New cards

public void Join()

What is used to stop the calling thread until a thread terminates?

30
New cards

public static void ResetAbort()

What is used to withdraw an abort request for the ongoing thread?

31
New cards

public void Start()

What is used to start a thread?

32
New cards

public static void Sleep()

What is used to pause a thread for the stated number in milliseconds?

33
New cards

Multithreading

In OS, what is the common feature that allows your application to have more than one execution path at the same time?

34
New cards

Multithreading

In […], the CPU is assigned to each thread for a time slice before moving on to the next thread.