Are threads shared between web modules?

I know that web servers use thread pools to spare expensive thread creation operation. My question is, are the thread pools shared amond different modules deployed on the same web server? In particular, we have two web modules deployed. A filter defi

Delphi - OTL - ThreadPool and Worker ThreadPool Communication

I'm using XE8 and I'm trying to built an example of my real world application. I need to communicate between the main "service thread" and the OTL thread pool. The examples are all set with forms and Monitors. I don't need those, but I can't fig

ExecutorService workStealingPool and cancel the method

Can you think about any reason why this code doesn't work and always outputs "finished", but the second example works without any problems. I'm using latest JDK (8u45). public static class MyClass implements Runnable { @Override public void run(

ManualResetEvent does not wait for the thread pool to complete

I have list of batches to process. forever. I want to do each chunk (5) in parallel, and when it is done move to the next chunk. for some reason, the code bellow is not waiting for the chunk to be done and continue even if it is not completed. while

Interrupting BlockingQueue take () in a thread pool

I have a thread pool which creates workers and the workers take the jobs from a BlockingQueue. The threads wait on take() from the queue. Even on explicitly calling the thread interrupt method for the running threads, they are still waiting on take()

Correct how to create tasks in Tomcat at startup

This question already has an answer here: How to run a background task in a servlet based web application? 4 answers Having read a lot of different things and not being totally familiar with the correct terms for some of these things, I am wondering

Optimize my thread pool

I have an application where I use Executors for creating a thread pool. Now, I know we can create a thread pool with n number of threads in it while creating. But in my case I don't want the pool size to be fixed. I want the application to create mor

Multithreaded architecture for N repetitive tasks

I have N tasks, each to be repeated after its own specific delay Interval(N) using a fixed thread pool size that will usually be smaller than N. Since there will usually be a shortage of threads, preference should be given to executing a different ta

When do you want to use two cached thread pools?

Consider this example from a Netty tutorial (although it's not the only example of it I've seen): Executor bossPool = Executors.newCachedThreadPool(); Executor workerPool = Executors.newCachedThreadPool(); ChannelFactory channelFactory = new NioClien

Query on thousands of TCP sockets

I need to connect to thousands of clients over TCP on a proprietary protocol to acquire data cyclically. I need to write a .NET server application in C#. The first attempt was to create for each tcp socket an own thread, which works but needs a lot o

Multi-threaded with the task library

in ASP.NET MVC I have an Action that accepts a list of email addresses entered by the user, validates them and then sends HTML and text version of email message to each recipient. User is then redirected to the thanks page. Because it is not necessar

Use a pool to generate images

Hi every one here is my code: -(void) createNewImage { [imageView setCenter:[self randomPointSquare]]; [[self view] addSubview:imageView]; [views addObject:imageView]; [imageView release];;; [XArray addObje

Thread pool handling 'duplicate' tasks

I want to be executing some different tasks in parallel, but have the concept that if a task is already queued or is currently processing, it will not get re-queued. I have read up a little on the Java API and have come up with the code below, which

Multiple audio tracks, single or multiple threads?

In my application, I will be creating multiple Audio Tracks, some of which will need to play simultaneously. I'm going to use MODE_STREAM and write data in as the app runs. Sounds are going to be dynamically generated, which is why I use Audio Track

How to monitor C # threads from another thread

I have several Threads running in a ThreadPool in my WPF App. I need to monitor them, possibly from another Thread to find out if all of those Threads have terminated. How would I be able to achieve this. For simplicity, my usage scenario is: Click a

How many threads can a Java VM support in Linux?

I wrote Thread pool class referring Environment: Windows7 4 cp Executed my program with 70,000 Thread in Windows 7, under JDK 1.5 it went through successfully. Not used vm arguments. The

Threadpool design question

I have a design question. I want some feedback to know if a ThreadPool is appropriate for the client program I am writing. I am having a client running as a service processing database records. Each of these records contains connection information to

Sizing the thread pool for network-related tasks

What are the basic rules for sizing a thread pool which contains tasks that: are always network-bound; access external services with different throughput and latency. My main concern is using the bandwith optimally ( i.e. don't process tasks serially

Exceptions on ThreadPool .Net threads

Duplicate: How to catch exceptions from a ThreadPool.QueueUserWorkItem? I am queueing up multiple delegates on the .Net ThreadPool for a large number of independant remoting calls that themselves call multiple databases and other offline resources. B