File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes yielding Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "yielding" Watch "yielding" New topic
Author

yielding

Paul Keohan
Ranch Hand

Joined: Mar 15, 2000
Posts: 411
I am in the middle of a project that requires about five Threads to be running in background simultaneously. None of them are connected to each other. Is the best way to ensure maximum efficiency, adding a yield() method to each one?
Paul
Laudney Ren
Ranch Hand

Joined: Jan 06, 2002
Posts: 111
When you finish one task on one thread, use yield() to give other threads chances to run. That's a good method.


" Veni, vidi, vici "<br />" I came, I saw, I conquered "
 
 
subject: yielding
 
Threads others viewed
More question ...
newbie Q on Thread Synchronization
Howard Stern and Sirius Radio
Number of words in your name
I/O
developer file tools