Want to have a look at what's going on
,
1000 tickets, for example, one thread to sell it to 30 ms
The open three threads should as long as 10 ms can sell out,
That how to statistics the time-consuming,,
CodePudding user response:
For (Thread Thread: threads) {
Thread. The join ();
}
CodePudding user response:
How to do ah, not to say that to join the thread will become a thread, that such a multithreaded changes has been single, have no meaning
CodePudding user response:
thread
CodePudding user response:
Using Thread. The activeCount ();
CodePudding user response:
CountDownLatch meets your needs
CodePudding user response: