Threading Flashcards

1
Q

When is a thread blocked?

A

A thread is deemed blocked when its execution is halted for some reason, such as when sleeping, waiting or joining.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which method explicitly uses a thread pool?

A

Task.Run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does maintaining good hygiene in the thread pool mean?

A

Ensuring that the pool is not over subscribed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the two operations that a thread can block on?

A

1) Compute or CPU bound

2) I/O bound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What type of asynchronous function should you invoke for compute-bound operations?

A

Multi-threading

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What type of asynchronous function should you invoke for I/O-bound operations?

A

Callbacks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly