A good example for producer consumer problem can be desktop search application.
for the producer it s the searcher alias crawler which just visits all the files on given roots or drives.
For the consumer we have the storer or the indexer who takes the file and provides easy an quick access to it.
For the implementation I guess blocking queue data structure is sufficient with two producer consumer threads.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment