Microsoft. NET Thread Pool

Source: Internet
Author: User
Tags net thread

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/wdswei/archive/2009/09/27/4597930.aspx

 

Summary

In-depth research on Microsoft. the thread pool provided by. Net to reveal under what circumstances you need to use the thread pool and. net Framework, and shows you how to use the thread pool.

Content

Introduction

. Net Thread Pool

Functions executed in the thread pool

Use Timer

Synchronization object execution

Asynchronous I/O operations

Monitor thread pool

Deadlock

Security

End

 

Introduction

 

 

 

 

If you have multi-threaded programming experience in any programming language, you must be very familiar with some typical examples. In general, multi-threaded programming is associated with applications based on user interfaces. They need to perform time-consuming operations without affecting end users. Take out any reference book and open the thread chapter: Can you find a Multithread example that can execute mathematical operations in parallel on your user interface?

My goal is not to let you throw your book. Don't do this! Multi-threaded programming technology makes applications based on user interfaces more perfect. In fact, the Microsoft. NET Framework supports the application of multi-threaded programming technology in Windows written in any language, allowing developers to design rich interfaces and provide end users with a better experience. However, the multi-threaded programming technology is not only for user interface applications, but also for applications without any user interface, there will be multiple execution streams.

We use a "hardware store" customer/server application system as an example. The client is a cash register, and the server is an application system running on an independent machine in the warehouse. You can imagine that the server does not have any user interface. How can you implement it without multithreading?

 

The server receives and processes requests from the client through channels (HTTP, sockets, files, and so on), and then sends a response to the client. Figure 1 shows how it works.

 

 

 

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.