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 small thread application, please help. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "small thread application, please help. " Watch "small thread application, please help. " New topic
Author

small thread application, please help.

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 758
I am learning Thead and therefore write a small application. Search two files and if "11111" is found, the application will stop.

Here, my questions are
1. I know this is not a good solution. Anything wrong ?

2. How to refactor it with JDK 5 Thread API ?


3. In console, why the application still outputs some log info after main thread is finished ?

4. where could I find a master-slave pattern of thread ? Any sample ?

Thanks.


[ December 08, 2008: Message edited by: Edward Chen ]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: small thread application, please help.
 
Similar Threads
Synchronization practice: why does thread1 rush through loop without pause or reset?
Boolean Logic
NumberFormatException thrown from parsing string to int
Cannot synchronise threads
deadlock?