Skip to main content

QUESTION 4

You work as the application developer at Certkiller .com. You need to modify the code of an application. The application uses two threads named thread A and thread B. You want thread B to complete executing before thread A starts  executing.

How will you accomplish the task?

 

A. Define thread A to run at a lower priority.

B. Define thread B to run at a higher priority.

C. Implement the WaitCallback delegate to synchronize the threads.

D. Call the Sleep method of thread A.

E. Call the SpinLock method of thread A.

 

Answer: C

 

Explanation: 

 

Note: Some confusion why the answer is C. Using the ThreadPool and WaitCallBack  will not synchronise the threads, they will run in the background in parallel

Comments

Popular posts from this blog

Top Open Source Web-Based Project Management Software

This is an user contributed article. Project management software is not just for managing software based project. It can be used for variety of other tasks too. The web-based software must provide tools for planning, organizing and managing resources to achieve project goals and objectives. A web-based project management software can be accessed through an intranet or WAN / LAN using a web browser. You don't have to install any other software on the system. The software can be easy of use with access control features (multi-user). I use project management software for all of our projects (for e.g. building a new cluster farm) for issue / bug-tracking, calender, gantt charts, email notification and much more. Obviously I'm not the only user, the following open source software is used by some of the biggest research organizations and companies world wild. For example, NASA's Jet Propulsion Laboratory uses track software or open source project such as lighttpd / phpbb use re...

DotNetNuke Overview

DotNetNuke is the leading Web Content Management Platform for Microsoft .NET. DotNetNuke can be used as a web content management system (CMS) for simple websites or as a powerful application development framework which enables businesses to quickly build and deploy feature-rich, interactive websites and applications in Microsoft .NET. An intuitive, menu-driven interface allows non-technical users to easily create new sites or extend the functionality and features of their existing web site when used as a web CMS. An open API and the availability of over 6,000 third-party add-on modules available through Snowcovered.com allow web development professionals to create complex web sites for demanding applications. Installing new modules or skins is quick and easy, allowing users to deploy new functionality on their web sites in just minutes. DotNetNuke is the world’s most widely adopted framework for building web solutions on Microsoft Windows Server. DotNetNuke powers o...

What is a content management system?

A content management system allows you to easily add, edit or remove content on your website without the need to contact your website design company (Us), or the need for any IT or programming skills. Changes to your website can be made via a simple web-based interface called WYSIWYG (What You See Is What You Get) editor. Which is an edior that can be accessed through any web browser, meaning you can update your website wherever you are, whenever you wish, as long as you have access to the internet. Updates are made in real time,and will be shown on your website instantly.