Top "Multithreading" questions

For questions regarding multi-threading, the ability of a computer or a program to perform work concurrently or asynchronously by utilizing multiple concurrent streams of execution (generally referred to as threads).

How to use the CancellationToken property?

Compared to the preceding code for class RulyCanceler, I wanted to run code using CancellationTokenSource. How do I use it …

c# multithreading asynchronous concurrency synchronization
Handling InterruptedException in Java

What is the difference between the following ways of handling InterruptedException? What is the best way to do it? try{ //... } …

java multithreading exception-handling interrupted-exception
Java synchronized method lock on object, or method?

If I have 2 synchronized methods in the same class, but each accessing different variables, can 2 threads access those 2 methods at …

java multithreading thread-safety locking synchronized
How to use WPF Background Worker

In my application I need to perform a series of initialization steps, these take 7-8 seconds to complete during which …

c# wpf multithreading backgroundworker
How do I make my ArrayList Thread-Safe? Another approach to problem in Java?

I have an ArrayList that I want to use to hold RaceCar objects that extend the Thread class as soon …

java multithreading collections synchronization arraylist
What is the difference between ManualResetEvent and AutoResetEvent in .NET?

I have read the documentation on this and I think I understand. An AutoResetEvent resets when the code passes through …

c# .net multithreading autoresetevent manualresetevent
Running multiple AsyncTasks at the same time -- not possible?

I'm trying to run two AsyncTasks at the same time. (Platform is Android 1.5, HTC Hero.) However, only the first gets …

android multithreading android-asynctask
Using a global variable with a thread

How do I share a global variable with thread? My Python code example is: from threading import Thread import time …

python multithreading global-variables
kill -3 to get java thread dump

I am using kill -3 command to see the JVM's thread dump in unix. But where can I find the …

java multithreading dump
Handling exceptions from Java ExecutorService tasks

I'm trying to use Java's ThreadPoolExecutor class to run a large number of heavy weight tasks with a fixed number …

java multithreading exception executorservice threadpoolexecutor