File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Threads and Synchronization and the fly likes looking for Multithreaded  patern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "looking for Multithreaded  patern " Watch "looking for Multithreaded  patern " New topic

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 ?
Ilja Preuss

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.
I agree. Here's the link:
subject: looking for Multithreaded patern
It's not a secret anymore!