You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2003/03/04 15:34:39 UTC
cvs commit: avalon-excalibur/thread/src/java/org/apache/excalibur/thread ThreadControl.java
bloritsch 2003/03/04 06:34:39
Modified: thread/src/java/org/apache/avalon/excalibur/thread
ThreadControl.java ThreadPool.java
thread/src/java/org/apache/avalon/excalibur/thread/impl
BasicThreadPool.java DefaultThreadPool.java
ResourceLimitingThreadPool.java
thread/src/java/org/apache/excalibur/thread
ThreadControl.java
Log:
make the old Thread completely compatible with the new
Revision Changes Path
1.9 +1 -36 avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/ThreadControl.java
Index: ThreadControl.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/ThreadControl.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ThreadControl.java 7 Feb 2003 16:08:55 -0000 1.8
+++ ThreadControl.java 4 Mar 2003 14:34:38 -0000 1.9
@@ -58,41 +58,6 @@
* @deprecated Replaced with org.apache.excalibur.thread.ThreadControl
*/
public interface ThreadControl
+ extends org.apache.excalibur.thread.ThreadControl
{
- /**
- * Wait for specified time for thread to complete it's work.
- *
- * @param milliSeconds the duration in milliseconds to wait until the thread has finished work
- * @throws IllegalStateException if isValid() == false
- * @throws InterruptedException if another thread has interrupted the current thread.
- * The interrupted status of the current thread is cleared when this exception
- * is thrown.
- */
- void join( long milliSeconds )
- throws IllegalStateException, InterruptedException;
-
- /**
- * Call Thread.interupt() on thread being controlled.
- *
- * @throws IllegalStateException if isValid() == false
- * @throws SecurityException if caller does not have permission to call interupt()
- * @deprecated Mispelled method. Please use interrupt() instead
- */
- void interupt()
- throws IllegalStateException, SecurityException;
-
- /**
- * Determine if thread has finished execution
- *
- * @return true if thread is finished, false otherwise
- */
- boolean isFinished();
-
- /**
- * Retrieve throwable that caused thread to cease execution.
- * Only valid when true == isFinished()
- *
- * @return the throwable that caused thread to finish execution
- */
- Throwable getThrowable();
}
1.7 +0 -1 avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/ThreadPool.java
Index: ThreadPool.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/ThreadPool.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ThreadPool.java 7 Feb 2003 16:08:55 -0000 1.6
+++ ThreadPool.java 4 Mar 2003 14:34:38 -0000 1.7
@@ -51,7 +51,6 @@
package org.apache.avalon.excalibur.thread;
import org.apache.avalon.framework.activity.Executable;
-import org.apache.excalibur.thread.ThreadControl;
/**
* This class is the public frontend for the thread pool code.
1.8 +4 -2 avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/BasicThreadPool.java
Index: BasicThreadPool.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/BasicThreadPool.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- BasicThreadPool.java 7 Feb 2003 16:08:55 -0000 1.7
+++ BasicThreadPool.java 4 Mar 2003 14:34:38 -0000 1.8
@@ -53,12 +53,12 @@
import org.apache.avalon.excalibur.pool.ObjectFactory;
import org.apache.avalon.excalibur.pool.Pool;
import org.apache.avalon.excalibur.thread.ThreadPool;
+import org.apache.avalon.excalibur.thread.ThreadControl;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Executable;
import org.apache.avalon.framework.container.ContainerUtil;
import org.apache.avalon.framework.logger.LogEnabled;
import org.apache.avalon.framework.logger.Logger;
-import org.apache.excalibur.thread.ThreadControl;
import org.apache.excalibur.thread.impl.AbstractThreadPool;
import org.apache.excalibur.thread.impl.WorkerThread;
import org.apache.excalibur.threadcontext.ThreadContext;
@@ -192,7 +192,9 @@
*/
public ThreadControl execute( final Executable work )
{
- return execute( new ExecutableExecuteable( work ) );
+ return
+ new WrappedThreadControl(
+ execute( new ExecutableExecuteable( work ) ) );
}
/**
1.16 +5 -4 avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java
Index: DefaultThreadPool.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- DefaultThreadPool.java 7 Feb 2003 16:08:55 -0000 1.15
+++ DefaultThreadPool.java 4 Mar 2003 14:34:38 -0000 1.16
@@ -53,6 +53,7 @@
import org.apache.avalon.excalibur.pool.ObjectFactory;
import org.apache.avalon.excalibur.pool.SoftResourceLimitingPool;
import org.apache.avalon.excalibur.thread.ThreadPool;
+import org.apache.avalon.excalibur.thread.ThreadControl;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.activity.Executable;
import org.apache.avalon.framework.container.ContainerUtil;
@@ -60,7 +61,6 @@
import org.apache.avalon.framework.logger.LogKitLogger;
import org.apache.avalon.framework.logger.Loggable;
import org.apache.avalon.framework.logger.Logger;
-import org.apache.excalibur.thread.ThreadControl;
import org.apache.excalibur.threadcontext.ThreadContext;
/**
@@ -148,7 +148,8 @@
*/
public ThreadControl execute( final Executable work )
{
- return m_pool.execute( work );
+ return new WrappedThreadControl(
+ m_pool.execute( new ExecutableExecuteable( work ) ) );
}
/**
@@ -158,7 +159,7 @@
* @param work the work to be executed.
* @return the ThreadControl
*/
- public ThreadControl execute( final Runnable work )
+ public org.apache.excalibur.thread.ThreadControl execute( final Runnable work )
{
return m_pool.execute( work );
}
@@ -170,7 +171,7 @@
* @param work the work to be executed.
* @return the ThreadControl
*/
- public ThreadControl execute( final org.apache.excalibur.thread.Executable work )
+ public org.apache.excalibur.thread.ThreadControl execute( final org.apache.excalibur.thread.Executable work )
{
return m_pool.execute( work );
}
1.13 +3 -3 avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/ResourceLimitingThreadPool.java
Index: ResourceLimitingThreadPool.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/ResourceLimitingThreadPool.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ResourceLimitingThreadPool.java 7 Feb 2003 16:08:55 -0000 1.12
+++ ResourceLimitingThreadPool.java 4 Mar 2003 14:34:38 -0000 1.13
@@ -289,9 +289,9 @@
* @param work the work to be executed.
* @return the ThreadControl
*/
- public ThreadControl execute( final Executable work )
+ public org.apache.avalon.excalibur.thread.ThreadControl execute( final Executable work )
{
- return m_pool.execute( work );
+ return new WrappedThreadControl( m_pool.execute( work ) );
}
/**
1.6 +0 -1 avalon-excalibur/thread/src/java/org/apache/excalibur/thread/ThreadControl.java
Index: ThreadControl.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/thread/src/java/org/apache/excalibur/thread/ThreadControl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ThreadControl.java 7 Feb 2003 16:08:55 -0000 1.5
+++ ThreadControl.java 4 Mar 2003 14:34:39 -0000 1.6
@@ -57,7 +57,6 @@
* @author <a href="mailto:peter at apache.org">Peter Donald</a>
*/
public interface ThreadControl
- extends org.apache.avalon.excalibur.thread.ThreadControl
{
/**
* Wait for specified time for thread to complete it's work.
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org
Re: cvs commit: avalon-excalibur/thread/src/java/org/apache/excalibur/thread ThreadControl.java
Posted by Peter Donald <pe...@realityforge.org>.
On Wed, 5 Mar 2003 19:20, Stephen McConnell wrote:
> Could you please provide a more verbose version of your problem. Could
> you explain what it is that is backward incompatible such that Berin and
> other may be able to contribute to the issue in a constructive manner?
If you could compile againts the cornerstone ThreadManager prior to his change
you will not be able to post change as packages of returned values have
changed.
If you compile against excalibur thread the same will happen due to changes in
the packages of returned elements.
--
Cheers,
Peter Donald
---------------------------------------------------
"It is easy to dodge our responsibilities, but we
cannot dodge the consequences of dodging our
responsibilities." -Josiah Stamp
---------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: cvs commit: avalon-excalibur/thread/src/java/org/apache/excalibur/thread
ThreadControl.java
Posted by Leo Simons <le...@apache.org>.
IIUC this is still not fixed. Berin, could you please take care of this
asap?
- Leo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: cvs commit: avalon-excalibur/thread/src/java/org/apache/excalibur/thread
ThreadControl.java
Posted by Stephen McConnell <mc...@apache.org>.
Peter Donald wrote:
>On Wed, 5 Mar 2003 07:52, Berin Loritsch wrote:
>
>
>>Peter Donald wrote:
>>
>>
>>>On Wed, 5 Mar 2003 01:34, bloritsch@apache.org wrote:
>>>
>>>
>>>Exactly what is it that you are doing ? Could you revert it to the way it
>>>was a week ago so it is backwards compatible?
>>>
>>>
>>Is it really breaking your code?
>>
>>
>
>does it matter - it is not backwards compatible.
>
>
Pete:
Could you please provide a more verbose version of your problem. Could
you explain what it is that is backward incompatible such that Berin and
other may be able to contribute to the issue in a constructive manner?
In the meantime I have every confidence that Berin is dealing with this
appropriately and if an issue exists - he will raise it for discussion
or resolve it as appropriate. I am equally confident that your opinions
(once presented clearly) will be taken into consideration.
Steve.
--
Stephen J. McConnell
mailto:mcconnell@apache.org
http://www.osm.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: cvs commit: avalon-excalibur/thread/src/java/org/apache/excalibur/thread ThreadControl.java
Posted by Peter Donald <pe...@realityforge.org>.
On Wed, 5 Mar 2003 07:52, Berin Loritsch wrote:
> Peter Donald wrote:
> > On Wed, 5 Mar 2003 01:34, bloritsch@apache.org wrote:
> >
> >
> > Exactly what is it that you are doing ? Could you revert it to the way it
> > was a week ago so it is backwards compatible?
>
> Is it really breaking your code?
does it matter - it is not backwards compatible.
> It should be even more compatible with
> the changes to Cornerstone.
nope.
--
Cheers,
Peter Donald
*----------------------------------------------------------*
The phrase "computer literate user" really means the person
has been hurt so many times that the scar tissue is thick
enough so he no longer feels the pain.
-- Alan Cooper, The Inmates are Running the Asylum
*----------------------------------------------------------*
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: cvs commit: avalon-excalibur/thread/src/java/org/apache/excalibur/thread
ThreadControl.java
Posted by Berin Loritsch <bl...@apache.org>.
Peter Donald wrote:
> On Wed, 5 Mar 2003 01:34, bloritsch@apache.org wrote:
>
>
> Exactly what is it that you are doing ? Could you revert it to the way it was
> a week ago so it is backwards compatible?
>
Is it really breaking your code? It should be even more compatible with
the changes to Cornerstone.
If you have a stack trace to post, let me see it.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org
Re: cvs commit: avalon-excalibur/thread/src/java/org/apache/excalibur/thread ThreadControl.java
Posted by Peter Donald <pe...@realityforge.org>.
On Wed, 5 Mar 2003 01:34, bloritsch@apache.org wrote:
> Index: ThreadControl.java
> ===================================================================
> RCS file:
> /home/cvs/avalon-excalibur/thread/src/java/org/apache/excalibur/thread/Thre
>adControl.java,v retrieving revision 1.5
> retrieving revision 1.6
> diff -u -r1.5 -r1.6
> --- ThreadControl.java 7 Feb 2003 16:08:55 -0000 1.5
> +++ ThreadControl.java 4 Mar 2003 14:34:39 -0000 1.6
> @@ -57,7 +57,6 @@
> * @author <a href="mailto:peter at apache.org">Peter Donald</a>
> */
> public interface ThreadControl
> - extends org.apache.avalon.excalibur.thread.ThreadControl
> {
> /**
> * Wait for specified time for thread to complete it's work.
Exactly what is it that you are doing ? Could you revert it to the way it was
a week ago so it is backwards compatible?
--
Cheers,
Peter Donald
"Man's mind stretched to a new idea never goes back to its original
dimensions." -Oliver Wendell Holmes
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org