473,406 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Threadpool question!

I was trying to do a batch process, where I have all the requests in a
table. I need to scan the table and for each entry I need to run a
thread (since it is long running process). This table get added
dynamically while this batch process is running. So I am trying to
findout the optimal way to use threadpool to achive this.

I have looked at couple of examples on the web and all of them takes
all the requests and queue them up. There is no logic in there to do
what I am trying to do. Is it possible to do this with Threadpool? Any
link or suggestion greatly appriciated.
Thanks.

Aug 4 '06 #1
2 1038
Instead of storing the rows in a table, why not take the information and
pass the row information to the thread pool? This way, each thread in the
pool has its own information to work on, and you don't have to worry about
new rows.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"DBC User" <db*****@gmail.comwrote in message
news:11**********************@s13g2000cwa.googlegr oups.com...
>I was trying to do a batch process, where I have all the requests in a
table. I need to scan the table and for each entry I need to run a
thread (since it is long running process). This table get added
dynamically while this batch process is running. So I am trying to
findout the optimal way to use threadpool to achive this.

I have looked at couple of examples on the web and all of them takes
all the requests and queue them up. There is no logic in there to do
what I am trying to do. Is it possible to do this with Threadpool? Any
link or suggestion greatly appriciated.
Thanks.

Aug 5 '06 #2
Thanks Nicholas, Only reason I am storing the data is for historic
purposes to show it to the client.
Nicholas Paldino [.NET/C# MVP] wrote:
Instead of storing the rows in a table, why not take the information and
pass the row information to the thread pool? This way, each thread in the
pool has its own information to work on, and you don't have to worry about
new rows.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"DBC User" <db*****@gmail.comwrote in message
news:11**********************@s13g2000cwa.googlegr oups.com...
I was trying to do a batch process, where I have all the requests in a
table. I need to scan the table and for each entry I need to run a
thread (since it is long running process). This table get added
dynamically while this batch process is running. So I am trying to
findout the optimal way to use threadpool to achive this.

I have looked at couple of examples on the web and all of them takes
all the requests and queue them up. There is no logic in there to do
what I am trying to do. Is it possible to do this with Threadpool? Any
link or suggestion greatly appriciated.
Thanks.
Aug 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dan Battagin | last post by:
Is there a known bug with the interaction between the HttpWebRequest and the ThreadPool? I current spawn several HttpWebRequest's using BeginGetResponse, and they work for a while, using worker...
4
by: David Levine | last post by:
Jon, I've taken a look at it and these comments are based on a code-inspection but I did not verify the correctness if its operation by using it in a sample. The ctor for CustomThreadPool...
3
by: Trebek | last post by:
Hello group: I have a quick question. Background: I have an assembly that is responsible for handling our clients' *requests* (not a webservice/http request per se but our concept of a...
13
by: orekin | last post by:
Hi There I have been programming C# for a couple of months and am trying to master Threading. I understand that ThreadPool uses background threads (see code example in MSDN page titled...
5
by: Peter Kirk | last post by:
Hi, I see in the ThreadPool documentation that the pool has a default limit of 25 threads. Is it correctly understood that this limit is for my entire application? So if I have several...
16
by: NOtcarvinSPAM | last post by:
It occurs to me that if I have a work object that gets executed via QueueUserWorkItem AND the work proc accesses only that object's instance data I STILL may have to lock because the object...
5
by: Henri | last post by:
Might sound a stupid question but need to be sure: When you call ThreadPool.QueueUserWorkItem and ThreadPool.RegisterWaitForSingleObject passing a New object as state e.g.:...
8
by: mabra | last post by:
Hi All ! Sorry, I could not find it :-( If the threadpool would be per application domain, I could just create another AppDomain to get another ThreadPool there. Alternately, I would have to...
3
by: Kevin | last post by:
Using this: http://msdn2.microsoft.com/en-us/library/3dasc8as(VS.80).aspx as an example I have a question concerning the reuse of objects. In the example 10 instances of the Fibonacci class...
3
by: UltimateBanoffee | last post by:
Hi, I'm using asp.net 2.0 and I have an understanding issue here! I don't quite understand when the available threads in the ThreadPool are ever used. The application I have running doesn't use...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.