donaldp 01/03/14 19:46:06 Modified: src/java/org/apache/avalon/util/thread DefaultThreadPool.java Log: Added some documentation. Revision Changes Path 1.2 +28 -0 jakarta-avalon/src/java/org/apache/avalon/util/thread/DefaultThreadPool.java Index: DefaultThreadPool.java =================================================================== RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/util/thread/DefaultThreadPool.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DefaultThreadPool.java 2001/03/15 03:42:21 1.1 +++ DefaultThreadPool.java 2001/03/15 03:46:06 1.2 @@ -70,12 +70,25 @@ return WorkerThread.class; } + /** + * Run work in separate thread. + * + * @param work the work to be executed. + * @exception Exception if an error occurs + */ public void execute( final Runnable work ) throws Exception { execute( work, Thread.NORM_PRIORITY ); } + /** + * Run work in separate thread at a particular priority. + * + * @param work the work to be executed. + * @param priority the priority + * @exception Exception if an error occurs + */ public void execute( final Runnable work, final int priority ) throws Exception { @@ -83,12 +96,27 @@ worker.execute( work ); } + /** + * Run work in separate thread. + * Wait till work is complete before returning. + * + * @param work the work to be executed. + * @exception Exception if an error occurs + */ public void executeAndWait( final Runnable work ) throws Exception { executeAndWait( work, Thread.NORM_PRIORITY ); } + /** + * Run work in separate thread at a particular priority. + * Wait till work is complete before returning. + * + * @param work the work to be executed. + * @param priority the priority + * @exception Exception if an error occurs + */ public void executeAndWait( final Runnable work, final int priority ) throws Exception { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]