Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multithreaded XML file parsing?



And if you are working in Java 1.5, I suggest that you investigate the java.util.concurrent package as it has some very sophisticated thread management routines that make your life much easier. For example, you could establish an executor with a thread pool of a fixed size and then start adding your file processing tasks to the executor. The executor would then take care of executing all the file processing tasks as threads become available. You combine this with a CountDownLatch that lets your main thread block until all other threads have finished.

Erik Husby

2209 Massachusetts Ave

Lexington, MA 02421

home: 781-862-8722 mobile: 781-354-6669

email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.