This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

small thread application, please help.  RSS feed

 
Edward Chen
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!