python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Parallel.Invoke and Index was outside the bounds of the array
I am sporadically seeing the following error,
System.IndexOutOfRangeException: Index was outside the bounds of the
array. at System.Collections.Generic.List`1.Add(T item)
I have a console applicatio...

JGV
Votes: 0
Answers: 2
When to use a mutex and when not
I have a global variable named my_list containing a linked list (i.e., the variable is a pointer to the first member of the list). This variable can be edited only by two threads, thread A and thread ...
madmurphy
Votes: 0
Answers: 1
How does java.util.Random guarantee thread safety on the nextGaussian method?
According to the Java documentation the nextGaussian mehtod is implemented as:
private double nextNextGaussian;
private boolean haveNextNextGaussian = false;
public double nextGaussian() {
if (...
Challe
Votes: 0
Answers: 0
How to write parallelly into a container
I'm working with C++14 and I don't know how to write parallelly into a container with multi-threading.
Let's say I have such a map: std::map<int, int> mp {{1, 0}, {2, 0}, {3, 0}} and a function ...

Yves
Votes: 0
Answers: 1