| Author |
looking for Multithreaded patern
|
Meir Yan
Ranch Hand
Joined: Apr 27, 2006
Posts: 597
|
|
Hello all sorry for my bad English i looking for pattern to deal with converting serial functionality to Multithreaded . my case is i have function that scans system paths (like: /home/foo/bar/ ) in text files (many text files ) now when it finds system path it preform set of function on the directory when its done it reports and updates in memory vector and log file. now i like to convert this functionality Multithreaded behavior so it will call in parallel the paths from the text files and do the actions on them but i don't know where to start .. what is the best way to begin with ? Thanks
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
Sounds a bit like the Producer/Consumer pattern might be interesting to you.
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
Here is a couple of links to guide you through. http://www.java2s.com/Code/Java/Threads/Producer-Consumer.htm http://www.javaworld.com/javaworld/jw-03-1997/jw-03-howto.html
|
 |
 |
|
|
subject: looking for Multithreaded patern
|
|
|