Xamarin.Android HTTP Random Times

I have a method that executes several HTTP requests called LoadServers() A button that executes LoadServers(). For my issue I only tap the button once the previous LoadServers() call has finished. A progress dialog appears while loading so I can only

Thread pool blocked pending

I'm encountering a stuck in my c++ program using this thread pool class: class ThreadPool { unsigned threadCount; std::vector<std::thread> threads; std::list<std::function<void(void)> > queue; std::atomic_int jobs_left; std::atomic_bool

Where to use the thread break

I have some old code I am working with, and I'm not too experienced with Threads (mostly work on the front end). Anyway, this Thread.sleep is causing the thread to hang and I'm unsure what to do about it. I thought about using a counter and throwing

Update the WPF user interface when loading

I want to update the UI while loading some long work. What I want is when the data is loading I want to show an UserControl which is nothing but a wait message. I have tried BackgroundWorker, Dispatcher.BeginInvoke and ThreadPool.QueueUserWorkItem bu

Queue and Dequeue in multiple threads

I'm creating an indexer which is Enqueueing items which needs to be processed. The indexer will add items to it's processer. It will for example add 100 items, then doesn't add items for 3 minutes and add another 50 items. public class Processer { pr

Test PriorityBlockingQueue in ThreadPoolExecutor

I realized my ThreadPoolExecutor with PriorityBlockingQueue like in this example: https://stackoverflow.com/a/12722648/2206775 and wrote a test: PriorityExecutor executorService = (PriorityExecutor) PriorityExecutor.newFixedThreadPool(16); executorSe

Java receiving Java objects as a datagram packet

I want to send an object as a UDP packet and then receiving the object on the server. I have the client side figure out, but I can't get the server to read in the datagram correctly. Client Code: public void sendMessage() { ByteArrayOutputStream bStr

Multi-threaded delegate problem, name of the expected method?

Right, this is my first venture into multi threading so could be something incredibly simple I'm missing but here goes... I'm using thread pool to kick off a bunch of short running processes at the same time, each will be passed a URL to process/scra

POC (Proof of concept) of ThreadPools with Executors

Can anybody explain with examples about why should we use Thread-pools. I have know about use of threadpools with Executors theoretically. I have gone through number of tutorials, but I didn't get any practically examples about why should we use Thre

Find out if another .Net thread is blocked?

When having started another .Net thread, is it possible to check whether it is currently blocked (e.g. synchronous I/O taking place)? I don't want to use a timeout or such, all I want is to know (from the original/dispatching thread) whether it (the

Java profiling in eclipse - call stack

Does anywone know a good profiler for call stack and thread in the same time. maybe something that can be slowed down to really see whats happening on those threads, waits on objects, synchronized metods and so on..Try VisualVM - it is free and rich-

Updating the progress bar of a thread pool

I have trying to process some data using multithreading where I am using threadpool to generate threads equal to the number of cores(Limited to .NET 2.0 to 3.5 so cant use TPL). All my threads execute the same function operating in different parts of

Threads processing a batch job in a servlet environment

I have a Spring-MVC, Hibernate, (Postgres 9 db) Web app. An admin user can send in a request to process nearly 200,000 records (each record collected from various tables via joins). Such operation is requested on a weekly or monthly basis (OR wheneve

Efficiency of the C thread pool

Possible Duplicate: How many threads is too many? I have a large for loop, in which I want each item to be passed to a function on a thread. I have a thread pool of a certain size, and I want to reuse the threads. What is the most efficient way to do

Threads Tomcat! = JVM threads?

The Tomcat Manager reports a different thread count than ThreadMXBean. The number of threads reported by ThreadMXBean is the same as the number of threads reported in the YourKit profiler as well. Is there a difference between Tomcat threads and JVM

Multi-thread serialization in C #

Problem: I have large number of big messages to serialize and send over network. I would like to maximize performance, so I'm thinking about creating multiple threads for message serialization and one thread for sending the data. Idea is to dynamical

TPL Tasks, Threads, etc.

Could someone clear up to me how these things correlate: Task Thread ThreadPool's thread Paraller.For/ForEach/Invoke I.e. when I create a Task and run it, where does it get a thread to execute on? And when I call Parallel.* what is really going on un

Use ThreadPool for logging the application?

As a followup on this question discussing the use of the ThreadPool vs a dedicated thread: When would you use a dedicated thread (with lowered priority) for applicationwide logging and when would you use the ThreadPool?What I would do is completely d

What happens to locks on objects passed to other threads?

I'm not quite sure how to word this, so I'll just paste my code and ask the question: private void remoteAction_JobStatusUpdated(JobStatus status) { lock (status) { status.LastUpdatedTime = DateTime.Now; doForEachClient(c => c.OnJobStatusUpdated(stat

Reusing java thread through the executor

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(

How to obtain the thread ID from a thread pool?

I have a fixed thread pool that I submit tasks to (limited to 5 threads). How can I find out which one of those 5 threads executes my task (something like "thread #3 of 5 is doing this task")? ExecutorService taskExecutor = Executors.newFixedThr

Advantages of the thread pool in embedded systems

I am looking at the advantages of threadpooling design pattern in Embedded systems. I have listed few advantages, please go through them, comment and please suggest any other possible advantages that I am missing. Scalability in systems like ucos-2 w

Exceptions on thread pool threads

Related: How to catch exceptions from a ThreadPool.QueueUserWorkItem? Exceptions on .Net ThreadPool Threads If a method throws an exceptions that is called by the ThreadPool.QueueUserWorkItem method where will the exception be thrown? or will it just