threadpool

Does an asynchronous call require an extra thread in the current process or use another thread in a thread pool?

I'm referring to this answer where it says it's not required, there are few specific assumptions though. That question is general. I'm using C# Asynchronous process is doing nothing but just calling an external API and waiting for the reply. ...

java thread reusage via executor

Hi, I am confused on the following: To use threads in a Java program, the simplest way is to extend Thread class and implement the runnable interface (or simply implement runnable). To start the thread's execution. we must call the Thread's method start(), which in turn calls method run() of the thread. And so the thread starts. The met...

How should I update a hash of hashes when using multi-threading in Perl?

I have been spending the last hours trying to figure this out and now I'm really confused. This is the outline of my task. I should write a Perl subroutine that gets a reference to a hash of hashes. I have another sub (helper) that gets a single inner hash and does some stuff to with, including adding keys. sub helper { $href = sh...

Which thread pool manager is recommended for Perl?

I only know of Thread::Pool which is apparently not supported in recent Perl versions, and Thread::Pool::Simple which lacks almost any documentation. So which thread pool manager can I use under Perl v5.10.1 or and higher? ...

ASP.NET reset thread culture after use?

If I set Thread Culture and UICulture for one ASPX, after pass for that page, all my aspx that use the same thread(not same request) will have the same Culture? Because I need to set Culture just for one ASMX ...

Thread synchronization with boost::condition_variable

Hello, I'm doing some experiments on C++ multithreading and I have no idea how to solve one problem. Let's say we have thread pool, that process user requests using existing thread and creates new thread, when no free thread available. I've created command_queue thread-safe class, which have push and pop methods. pop waits while queue i...

Threadpool, order of execution and long running operations

I have a need to create multiple processing threads in a new application. Each thread has the possibility of being "long running". Can someone comment on the viability of the built in .net threadpool or some existing custom threadpool for use in my application? Requirements : Works well within a windows service. (queued work can be...

Why is my call to Runspace.Open() not returning?

I am trying to integrate some new code I wrote for programmatically interacting with Exchange 2010 via Remote Powershell into an existing WinForms application. My code works in an isolated test application, but when I run the code in the context of my app the call to Runspace.Open() blocks for a very long time -- well past the OpenTimeou...

NotSupportedException on WaitHandle.WaitAll

I am trying to execute the following code. The code tries to parallely download and save images. I pass a list of images to be downloaded. I wrote this in C# 3.0 and compiled it using .NET Framework 4 (VS.NET express edition). The WaitAll operation is resulting in a NotSupportedException (WaitAlll for multiple handles on a STA thread is ...

Some questions about Threading in Java

First a little background. I got a warning in NetBeans told me not to start a new thread in a constructor. I have read that the reason for that is because the new thread might start and try to reference the object started the thread before the constructor is actually done making the object. 1.) For the sake of experimentation instead...

ThreadPool Parameters

I am testing a simple threadpool solution before I put it in my application, but the results I am seeing do not make sense for me. I have a simple form with one button on it. This button starts the following loop: private void button1_Click(object sender, EventArgs e) { MyTestThread oTask = new MyTestThread (); MyThreadInfo oTa...

Should the first call to a WCF service take an extraordinary amount of time?

I've got a WCF service operation that just does a LINQ query on a SQL database, looking up 1 of 35 records that have a matching Guid (it's really as simple as it gets). When I call this method from a simple sandbox application, it comes back right away. However, when I have it running in a windows service, the first call to the method ta...

Do the JBoss attributes ActiveThreadCount and ActiveThreadGroupCount have maximums?

Hi, In JBoss 5, there is the mbean jboss.system:type=ServerInfo Which has the properties ActiveThreadCount and ActiveThreadGroupCount. Does anyone know if there are maximum values for either or both of these properties, and if there are, how to find them out? I am happy parsing configuration files if necessary. Looking at the sourc...

ThreadPool vs dedicated Thread - when to prefer which

Is there any way (apart form actual perfomance measurements which can be pretty hard to make them realistic) or rule of thumb when I should stop using the ThreadPool and use a dedicated Thread instead? I suppose for long running work it is better to use a dedicated Thread because it doesn't peramently steal one from the ThreadPool. For s...

boost threadpool

I'm trying to create a threadpool with the boost threadpool library, but on defining it I keep getting lots of error about template params being wrong. I'm probably doing something fundamentally wrong, but I'm not seeing it? //Threadpool typedef boost::threadpool::thread_pool< boost::threadpool::task_func, boost::threadpool::fi...

Why doesn't Ruby have a ThreadPool built-in?

I have a program that creates 10000 threads at once, and runs 8 at the same time. But ruby doesn't have a ThreadPool built-in as Java. Is there a good reason? ...

http request and thread pool

Hi, I have this problem. In order to create a response for a single http request, I have to do several tasks that can be performed concurrently. I can perform those tasks in a Executor (thread pool) but then I have to worry about concurrency (synchronization) in my web app. Is there a better way to solve this problem without using threa...

A ThreadPool library in C++

I am looking for a good and stable threadpool library for C++ that's fairly well documented. I know about the Native Windows thread pool API and the newer Vista Thread Pool API, however my program requires some backward compatibility, so perhaps an outside library I can provide with the program is better. I have looked into Boost's thr...

ThreadPoolExecutor - ArrayBlockingQueue ... to wait before it removes an element form the Queue

I am trying to Tune a thread which does the following: A thread pool with just 1 thread [CorePoolSize =0, maxPoolSize = 1] The Queue used is a ArrayBlockingQueue: http://download.oracle.com/javase/6/docs/api/java/util/concurrent/BlockingQueue.html#poll%28long,%20java.util.concurrent.TimeUnit%29 Quesize = 20 BackGround: The thread tr...

Best way to report thread progress

I have a program that uses threads to perform time-consuming processes sequentially. I want to be able to monitor the progress of each thread similar to the way that the BackgroundWorker.ReportProgress/ProgressChanged model does. I can't use ThreadPool or BackgroundWorker due to other constraints I'm under. What is the best way to all...