You're a lifesaver! Math.random() was the problem. :) I changed my program to use the nextBoolean() method in the random class, and I now see approx. a 2 times speed up when using 2 threads vs. 1....
Type: Posts; User: centenial
You're a lifesaver! Math.random() was the problem. :) I changed my program to use the nextBoolean() method in the random class, and I now see approx. a 2 times speed up when using 2 threads vs. 1....
Hey everyone,
Let me state up front that this is a homework assignment.
I'm supposed to take a simple task (flipping a coin n number of times) and use threading to increase the execution speed...