[concurrency-interest] differentiating between result-bearing and non- result-bearing actions

Gary Moyer notgermy@yahoo.com
Wed, 14 Jan 2004 16:26:44 -0800 (PST)

Consider an array of ScheduledFuture objects that are representative of actions
that are both result-bearing and non- result-bearing.  To clarify a
result-bearing action references a java.util.concurrent.Callable<V> whereas a
non- result-bearing action references a java.lang.Runnable.  Is it possible to
differentiate one from the other?  Additionally, if the action is repeating
(e.g. created via scheduleAtFixedRate()) is it possible to retrieve the
associated period?

As an example scenario consider attempting to collect the results of all
result-bearing actions using said array.

-- Gary

Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes