pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger L. Whitcomb" <Roger.Whitc...@ingres.com>
Subject RE: Question about background tasks
Date Mon, 18 Jul 2011 19:00:17 GMT
Thanks, Greg.  We thought so but just wanted to check for sure.


Roger Whitcomb | Architect, Engineering | Roger.Whitcomb@ingres.com|
Ingres | 500 Arguello Street | Suite 200 | Redwood City | CA | 94063 |
7068&sspn=50.557552,73.037109&ie=UTF8&t=h&z=16&iwloc=addr>  | +1
650-587-5596 | fax: +1 650-587-5550

From: Greg Brown [mailto:gk_brown@verizon.net] 
Sent: Monday, July 18, 2011 11:49 AM
To: user@pivot.apache.org
Subject: Re: Question about background tasks


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



PHONE +1 650.587.5596

FAX +1 650.587.5550


www.ingres.com <http://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.



View raw message