Yes, it is safe to call isPending() on a task from another thread. On Jul 18, 2011, at 2:42 PM, Roger L. Whitcomb wrote:
> Regarding org.apache.pivot.util.concurrent.Task<V> derived tasks: > > Is it safe for one task running on a background thread to call the > isPending() method of some other task that is running on a different > background thread? > > Our particular use case involves two background tasks that need to coordinate > (minimally) with each other. A second task wants to keep running at least as > long as the first task is still in progress. So the second task periodically > checks theisPending() method of the first task. > > > > > Roger Whitcomb > Architect, Engineering > Ingres Corporation > [email protected] > > PHONE +1 650.587.5596 > FAX +1 650.587.5550 > > www.ingres.com > > This transmission is confidential and intended solely for the use of the > recipient named above. It may contain confidential, proprietary, or legally > privileged information. If you are not the intended recipient, you are hereby > notified that any unauthorized review, use, disclosure or distribution is > strictly prohibited. If you have received this transmission in error, please > contact the sender by reply e-mail and delete the original transmission and > all copies from your system. >
