Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
You also have to remove the sleep from the second test, which would
reduce the elapsed time accordingly.
From my understanding the "sleep" is just to simulate the threads "doing
other stuff" such as waiting for a DB/disk/etc. to respond,
No, if you review the code in the Task class, you'll see that sleep() is
run only once at the entry point of the call() method - just prior to
executing the 20K loop.
A Java nut might say, "Look ma, I can take a multi-threaded CPU bound
workload that would normally use 60% of one core for 15 seconds and force
it to use 100% of 8 cores for 11 seconds, and accomplish the same thing."
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.