Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
How to make threads share CPU (almost) equally?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Frank, post: 604135"] Above normal priority might be appropriate for IO or very critical and extremely short-lived tasks. It doesn't make your computer any faster, you'll just be stealing cpu time from other, perhaps more important, tasks. Hmm.. Probably ok if all the threads really are already started and you don't need to do anything else from your main thread till all the workers are finished. I assume joining on a finished thread will just return immidiately. Really? Try it the other way around... No reason to call sleep for a thread doing blocking IO. If it's non-blocking OTOH, you want to suspend it for a while when there's no input ready, or it will just burn cycles checking for input over and over. And do go over your synchronization approach, checking for deadlocks. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
How to make threads share CPU (almost) equally?
Top