PooledExecutor and timing tasks (before/after hooks)?

O

OtisUsenet

Hello,

I'm trying to use PooledExecutor from Doug Lea's concurrency package
with Java 1.4 (
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.html
) and I don't see any before/after hooks that I could use to time tasks
executed by this PooledExecutor.

Is there a way to do it with this package?
I need to run a bunch of tasks, and I want to time how long each took
to run.

I can do it with Java 1.5 and its
java.util.concurrent.ThreadPoolExecutor, because that class has
beforeExecute() and afterExecute() hooks. I simply override them in a
subclass and make note of start and stop time for each task.

But can this be done in Java 1.4 somehow with the concurrency package?
Any pointers would be greatly appreciated.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top