Currently I'm migrating from one PC to the other, so there are couple of things that I HAVE to take there with me:
Map Any Key to Any Key on Windows 7 / XP / Vista - can be useful if you have page up and page down keys next to arrows, IMO home / end should be placed there.
Ditto - Clipboard Manager - remembers all CTR+C 's :)
Unlocker
Monday, 19 November 2012
Monday, 12 November 2012
Producer-Consumer sample - Listing files
Listing files is reeally slow operation.
That's why I decided that it will be a good use case to have some fun with java's concurrency.
Producer-Consumer pattern seemed to fit my needs.
Please find my sources @ https://bitbucket.org/pawelmichalski/repo/src.
... Actually I should write something about my code to justify some of my implementating decisions, but it's being late right now in Poland :) so consider this entry as asking for code review in some free time.
cheers.
That's why I decided that it will be a good use case to have some fun with java's concurrency.
Producer-Consumer pattern seemed to fit my needs.
- Producer is listing all files from given directory.
- Consumer is filtering proper files and propagates this data to GUI in real-time.
- Both are connected by BlockingQueue:
BlockingQueue<List<File>> myQueue = new LinkedBlockingQueue<List<File>>();
Please find my sources @ https://bitbucket.org/pawelmichalski/repo/src.
... Actually I should write something about my code to justify some of my implementating decisions, but it's being late right now in Poland :) so consider this entry as asking for code review in some free time.
cheers.
Subscribe to:
Posts (Atom)