Managing child worker threads list

After so much research, I thought I should ask the experts.

I am working on a project for my corporate employer, we have android and iPhone mobile apps that make request to a web service, the request is logged in pending state for processing.

A windows service retrieves the pending requests and spins a new thread for every request. This is because the request could be directed to different providers who process request in different manners. One could immediately process the request and return feedback, others could receive the request and take up to 30 seconds to return a feedback which you have to poll for the status.

The mobile app will also be polling for the status of the request.

Now my challenge is:

I am thinking of creating a list of threads say 100 and assign each thread to execute a request, once finished the thread will be recreated and assigned a new request. It is a high response based platform so I am thinking of not using ThreadPool.

Is it advisable to spin new threads in a fire and forget sequence or manage these list of threads and if it is to managed, then what is the best approach to manage these list of threads and ensure high performance in C# as the mobile apps will be polling for a response.

Regards

链接地址: http://www.djcxy.com/p/74510.html

上一篇: 每秒钟轮询一次数据库并开始n个长时间运行的任务

下一篇: 管理子工作线程列表