.Net Interview Questions and Answers

Search:

.NET interview questions and answers: - What is TPL?

By : Shiv Prasad Koirala | Feb 16th, 2013 | Views : 4305 | Comments : 0 Bookmark and Share

This question is taken from threading chapter from .NET interview question and answers bookwritten by Shivprasadkoirala and published by BPB publications.

 

If you are new to c# threading, see this video c# threading interview question :- What is threading ?

 

 

TPL stands for Task parallel library. Its introduced in .NET 4.0 framework to simplify threading.TPL is set of API's which sits on top of core threading and simplifies threading. When we use threading API directly you need to take care of pooling, ensure that thread executes on multiple processors, data and task parallelism etc. When you use TPL all these things are taken care of so that you concentrate on the work rather than these lower level technical details.

 

TPL simplifies the following things from development aspect :-

      Thread pooling is taken care internally.

      TPL ensures that threads will execute on multiple processors.

      Cancellation of threads made easier.

      State management simplified as compared to core threading.


All components of TPL (task parallel library) exists in the below namespace.



To invoke a thread using TPL we need to use the below syntax We need to create the object of task object to invoke a thread.


  tsk.Start();


There are more such 500 c# and .NET interview questions and answers visit www.questpond.com

 
Rate this Article :
1 Star
2 Stars
3 Stars
4 Stars
5 Stars
1 1 1 2 1
 
 
 
 

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

WCF Interview questions and answers: -What is the difference between WCF fault exceptions and normal .NET exceptions?

In this article we will show difference between WCF fault exceptions and normal .NET exceptions. For more articles and videos visit us on http://www.questpond.com/... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

MVC vs ASP.NET ( MVC Interview question with answers )?

In this article we will explain MVC vs ASP.NET.For more articles and videos visit us on www.questpond.com... Read More

C# and .NET interview question: - Define Named and Optional Arguments?

Visual C# 2010 introduces two interesting features called as Named and Optional Arguments.... Read More

.NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala

In this article we will explain .NET interview questions 6th edition (Sixth edition) - By Shivprasad Koirala.... Read More

WCF Interview questions and answers: -What is the difference between WCF fault exceptions and normal .NET exceptions?

In this article we will show difference between WCF fault exceptions and normal .NET exceptions. For more articles and videos visit us on http://www.questpond.com/... Read More

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

In this article we will explain What is the difference between Service endpoint and Client endpoint.... Read More

MVC vs ASP.NET ( MVC Interview question with answers )?

In this article we will explain MVC vs ASP.NET.For more articles and videos visit us on www.questpond.com... Read More

C# and .NET interview question: - Define Named and Optional Arguments?

Visual C# 2010 introduces two interesting features called as Named and Optional Arguments.... Read More

Article Categories

Learn in Hindi