tagged [multithreading]

When to use 'volatile' or 'Thread.MemoryBarrier()' in threadsafe locking code? (C#)

When to use 'volatile' or 'Thread.MemoryBarrier()' in threadsafe locking code? (C#) When should I use volatile/Thread.MemoryBarrier() for thread safety?

25 Aug at 20:5

ReaderWriterLock vs lock{}

ReaderWriterLock vs lock{} Please explain what are the main differences and when should I use what. The focus on web multi-threaded applications.

22 Jan at 11:49

What is the difference between lock and Mutex?

What is the difference between lock and Mutex? What is the difference between lock and Mutex? Why can't they be used interchangeably?

4 Oct at 17:47

What's the difference between deadlock and livelock?

What's the difference between deadlock and livelock? Can somebody please explain with examples (of code) what is the difference between and ?

How many threads can a Java VM support?

How many threads can a Java VM support? How many threads can a Java VM support? Does this vary by vendor? by operating system? other factors?

6 Aug at 16:18

Create multiple threads and wait for all of them to complete

Create multiple threads and wait for all of them to complete How can I create multiple threads and wait for all of them to complete?

25 Oct at 06:34

Difference between BackgroundWorker and System.Threading.Thread

Difference between BackgroundWorker and System.Threading.Thread What is the difference between creating a thead using BackgroundWorker and creating a thread using System.Threading.Thread?

24 Oct at 19:41

Details of AsyncWaitHandle.WaitOne

Details of AsyncWaitHandle.WaitOne 1)The call AsyncWaitHandle.WaitOne may block client or will definitely block the client?. 2)What is the difference between WaitAll,WaitOne,WaitAny?

9 Feb at 13:32

How to pass more than one parameter to a C# thread?

How to pass more than one parameter to a C# thread? How to pass more than one parameter to a C# thread? Any example will be appreciated.

22 Mar at 10:12

Why no AutoResetEventSlim in BCL?

Why no AutoResetEventSlim in BCL? Why isn't there an `AutoResetEventSlim` class in BCL? Can it be simulated using `ManualResetEventSlim`?

What is a race condition?

What is a race condition? When writing multithreaded applications, one of the most common problems experienced is race conditions. My questions to the community are: - - - -

How can I force all program threads to exit on program close?

How can I force all program threads to exit on program close? How can I ensure that all program threads abort after I have closed the main window?

16 Jan at 19:12

Why doesn't JavaScript support multithreading?

Why doesn't JavaScript support multithreading? Is it a deliberate design decision or a problem with our current day browsers which will be rectified in the coming versions?

5 Sep at 00:17

How to implement simple threading with a fixed number of worker threads

How to implement simple threading with a fixed number of worker threads I'm looking for the simplest, most straightforward way to implement the following: - - `n`- `n``n`

29 Apr at 15:41

Thread safety in C# arrays

Thread safety in C# arrays Does having 2 different threads : - - is thread safe or not? (And I mean here without locking reading nor writing)

are static classes shared among different threads in C#

are static classes shared among different threads in C# I need to share a value between threads without exceeding it's boundary. Does a static variable do this?

22 Mar at 16:33

Why use ThreadStart?

Why use ThreadStart? Can somebody please clarify why we use ThreadStart?

19 May at 10:10

Why do we need ContinueWith method?

Why do we need ContinueWith method? Why do we need `Task.ContinueWith()` method. Cannot we just write that "continuation code" inside Task body?

When does Thread.CurrentThread.Join() make sense?

When does Thread.CurrentThread.Join() make sense? What is the effect of calling Thread.CurrentThread.Join(), and if/when would it make sense to call it?

12 Jun at 18:22

Accessing UI in a thread

Accessing UI in a thread When i try to change a UI property (specifically enable) my thread throws System.Threading.ThreadAbortException How do i access UI in a Thread.

2 Apr at 10:31

C# : Monitor - Wait,Pulse,PulseAll

C# : Monitor - Wait,Pulse,PulseAll I am having hard time in understanding `Wait()`, `Pulse()`, `PulseAll()`. Will all of them avoid deadlock? I would appreciate if you explain how to use them?

15 Jun at 21:24

Good source to learn multithreading with .net?

Good source to learn multithreading with .net? Can somebody point me to a good site/book/article about multithreading with .net? I didn't find much info about this... thanks

7 Apr at 20:3

Get list of threads

Get list of threads I want to list all running threads but not by using the `List` class. I want to dynamically observe running threads. How can I do that?

19 Oct at 13:16

Pass Parameters through ParameterizedThreadStart

Pass Parameters through ParameterizedThreadStart I'm trying to pass parameters through the following: Any idea how to do this? I'd appreciate some help

10 Jan at 13:25

How to call a method with a separate thread in Java?

How to call a method with a separate thread in Java? let's say I have a method `doWork()`. How do I call it from a separate thread (not the main thread).

16 Aug at 01:53