Questions tagged [java-threads]

For questions related to Java threads, including concurrent data structures, the fork-join framework, atomic classes, thread locking/synchronization, visibility and latency

Examples include:

  • Usages of java.util.concurrent.* data structures
  • Fork-join framework,
  • Atomic classes
  • Thread locking/synchronization, visibility and latency
1037 questions
-5
votes
1 answer

Why are Java Threads needed?

I have a general question. I have been reading a Java book and I came across a program that uses Threads. Book stated that Threads are used for multiprocessing. I want to know that if I write : Thread t=new Thread(new classname); t.start; //after it…
-9
votes
3 answers

Optimizing thread calls in Java

TokenGenerator.main() (called at the bottom) is used to generate 10 character alphanumeric tokens and write them to a text file. I want to try to produce as many of these as possible. I was wondering if there is a better way of doing this: package…
Alex Ritchie
  • 199
  • 2
  • 5
  • 18
1 2 3
69
70