PrepAway - Latest Free Exam Questions & Answers

What should you do?

You work as the application developer at Domain.com. Domain.com uses Visual Studio.NET 2005 as its application development platform.
You are developing a .NET Framework 2.0 Windows service application that is used to perform several short tasks that require background processing.
You are not required to actively manage threads in your application but you are required to ensure that security checks are performed during the execution of the task.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Use ThreadPool.queueUserWorkItem.

B.
Use ThreadPool.UnsafeQueueUserWorkItem.

C.
Use Thread.Resume.

D.
Use Thread.Start.

Explanation:
The scenario requires several short tasks to be run which requires background processing. Using the ThreadPool class is ideal in this situation as the system manages the thread pool meaning you have less overhead involved.
Incorrect Answers:
B: This method should not be considered for use as the security check the scenario requires will not be performed.
C, D: This method should not be considered because the Thread class is useful for creating threads that run in the foreground that are actively managed.

One Comment on “What should you do?


Leave a Reply