I'm working on a multi-threaded scraper for a website and as per a different question I've decided to use the ThreadPool with QueueUserWorkItem().
How can I continually Queue work items without queuing them all at once? I need to queue > 300k items (one for each userID) and if I loop to queue them all I'll run out of memory.
So, what ...
Hi.
I have a general question about System.Threading.Threadpool when run in a webapplication on IIS.
Say we have 2 requests execute at once, and we fire up a couple of threads through the ThreadPool.QueueUserWorkItem method. Will the two requests share the ThreadPool, or will the calls to the ThreadPool from the two requests operate in...
I'm working on my first ThreadPool application in Visual Studio 2008 with C#.
I have a report that has to perform calculations on 2000 to 4000 parts using data on our SQL Server.
I am Queuing all of the part numbers in a ThreadPool, where they go off and calculate their results. When these threads are finished, the RegisterWaitForSingl...
I want to make the calls to a method parallel. In this method I calculate some value (very fast) and write the value of this calculation into a database table.
Therefore I use a Threadpool
ThreadPool.QueueUserWorkItem((state) => {
method();
});
After a while of calculation (not deterministic, the time when ...
I want to set the minimum number of threads. I knoe the number of workerThreads I need but about the completionPortThreads what should be it's size (by dafault it is equal to the number of processors). can I set it to 0 or is it risky? when will it be used?
...
I have a thread pool created using
java.util.concurrent.ThreadPoolExecutor
Is there anyway I can wait till the pool is idle? By which I mean all the threads are not running and nothing is waiting in the queue.
I searched the web and all the solutions don't work for me. For example, I don't want shutdown the pool so awaitTerminatio...
I have a web application running in tomcat where I'm using a ThreadPool (Java 5 ExecutorService) to run IO intensive operations in parallel to improve performance. I would like to have some of the beans used within each pooled thread be in the request scope, but the Threads in the ThreadPool do not have access to the spring context and ...
The recommended best practice is to set the current culture of the application's thread to enable resource look ups to use the correct language.
Unfortunately, this does not set the culture for any other threads. This is especially a problem for thread-pool threads.
The question is: how is it possible to set enable string resource lo...
is it acceptable to use ThreadPool in a library?
because that obviously might cause some unpleasant problems if the user of your library is using ThreadPool as well (due to ThreadPool being a static class of course)..
what's the convention?
...
In my case I've got a game server, with the CLR threadpool handling the sockets, and a managed threadpool for the other stuff. I'm trying to figure out what the best way to handle events like, an npc casting a spell, or despawning after a set period is.
I could just write some sort of Timer wrapper that gets a new (managed)threadpool t...
How is it possible to get/use/return a thread from an execute queue ( = thread pool) in WebLogic 8.1.6?
...
Hi,
I am sorry for the title but I really do not know how to better describe it. I am using threadpool for processing incoming data on the server side and in one method I would need to call static method asynchronously but I am not sure how to do that.
When server receives the data from client, it uses threadpool:
System.Threading.Thre...
Dear ladies and sirs.
I am looking into alternative ThreadPool implementations and have found the SmartThreadPool implementation by Ami Bar. It looks very interesting, so my question is whether anyone has actually used it and if so - please share the experience.
Thanks.
P.S.
Our thread usage matches the one described as optimal by Am...
Hi StackOverflow,
i have this rather simple question about the ThreadPoolExecutor. I have the following situation: I have to consume objects from a queue, create the appropiate worker tasks for them and submit them to the ThreadPoolExecutor. This is quite simple. But within a shutdown scenario many workers may be queued to execution. Si...
hi,
I want to use the boost threadpool library from open source(http://threadpool.sourceforge.net/) I am getting an complilation error with the example program itself.
/usr/include/boost/./threadpool/./detail/locking_ptr.hpp: In constructor âboost::threadpool::detail::locking_ptr::locking_ptr(volatile T&, const volatile Mutex&) [with ...
I must port a project to the compact framework. And can not convert to
ThreadPool.RegisterWaitForSingleObject
(WaitHandle, WaitOrTimerCallback,
object, int, bool)
What may be a alternative way for ThreadPool.RegisterWaitForSingleObject in c#
lock (this.RegLock)
{
if (!this.WaitFlag)
{
this.mre.Reset();
...
we have a scenario where in whil serving one asp.net request from iis from our code we have created a child thread from thread pool to servve some background task.the idea was to finsih the main thread wihich is processing the request without depending on our child thread task. But our doubt is while processing a request in asp.net will ...
Here's the setup: I'm trying to make a relatively simple Winforms app, a feed reader using the FeedDotNet library. The question I have is about using the threadpool. Since FeedDotNet is making synchronous HttpWebRequests, it is blocking the GUI thread. So the best thing seemed like putting the synchronous call on a ThreadPool thread, and...
I made a custom ThreadPool optimized for my specific needs. However, when there are multiple AppDomains in the process, the CLR ThreadPool is able to be shared across all the AppDomains and I would like to be able to reproduce this behavior.
This could be done using MarshalByRefObject and Remoting in order to create a distributed Thread...
We are currently enhancing an ASP.NET app that performs quotes on a number of products.
At present the existing quote engine is basically a big stored procedure (2-3 secs per call) followed by a small amount of business logic that runs after the procedure call.
We are looking into multi-threading the call to each product in order to sp...