[concurrency-interest] 'Future' definition

Patrick Moore pmoore@brocade.com
Mon, 9 Dec 2002 16:02:48 -0800


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C29FDF.79451890
Content-Type: text/plain

Glad you asked.

The Future interface needs to have a 'clear()' method as well as the
'set(Object)' and setException(Throwable)'

The reason for this is that in some code that I have that no 'Future' can
control the life time of the Runnable. Essentially, I am running a thread
that is gathering data. This data is then parcelled out to many different
Futures. So no one Future object can control the runnable. Also this
runnable is operating continuously. During the update period it is
desireable to make sure that any thread trying to use the Future block
during the refresh. Thus the need for the clear().

Essentially, this is a cache that is periodically refreshed. 

As a final point, setException() should really be called setThrowable() in
keeping with it's argument.

>-----Original Message-----
>From: Doug Lea [mailto:dl@cs.oswego.edu]
>Sent: Monday, December 09, 2002 3:45 PM
>To: concurrency-jsr@altair.cs.oswego.edu
>Cc: concurrency-interest@altair.cs.oswego.edu
>Subject: Re: [Concurrency-jsr] RE: [concurrency-interest] Soliciting
>input about removeAllThreadLocals
>
>All concurrency-interest list members who now have nothing to complain
>about are strongly encouraged to rescan APIs du jour and find
>something else they want to carefully examine and tell us what they
>don't like about it.  See
>  http://gee.cs.oswego.edu/dl/concurrent/index.html

------_=_NextPart_001_01C29FDF.79451890
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>'Future' definition</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Glad you asked.</FONT>
</P>

<P><FONT SIZE=3D2>The Future interface needs to have a 'clear()' method =
as well as the 'set(Object)' and setException(Throwable)'</FONT>
</P>

<P><FONT SIZE=3D2>The reason for this is that in some code that I have =
that no 'Future' can control the life time of the Runnable. =
Essentially, I am running a thread that is gathering data. This data is =
then parcelled out to many different Futures. So no one Future object =
can control the runnable. Also this runnable is operating continuously. =
During the update period it is desireable to make sure that any thread =
trying to use the Future block during the refresh. Thus the need for =
the clear().</FONT></P>

<P><FONT SIZE=3D2>Essentially, this is a cache that is periodically =
refreshed. </FONT>
</P>

<P><FONT SIZE=3D2>As a final point, setException() should really be =
called setThrowable() in keeping with it's argument.</FONT>
</P>

<P><FONT SIZE=3D2>&gt;-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>&gt;From: Doug Lea [<A =
HREF=3D"mailto:dl@cs.oswego.edu">mailto:dl@cs.oswego.edu</A>]</FONT>
<BR><FONT SIZE=3D2>&gt;Sent: Monday, December 09, 2002 3:45 PM</FONT>
<BR><FONT SIZE=3D2>&gt;To: concurrency-jsr@altair.cs.oswego.edu</FONT>
<BR><FONT SIZE=3D2>&gt;Cc: =
concurrency-interest@altair.cs.oswego.edu</FONT>
<BR><FONT SIZE=3D2>&gt;Subject: Re: [Concurrency-jsr] RE: =
[concurrency-interest] Soliciting</FONT>
<BR><FONT SIZE=3D2>&gt;input about removeAllThreadLocals</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;All concurrency-interest list members who now =
have nothing to complain</FONT>
<BR><FONT SIZE=3D2>&gt;about are strongly encouraged to rescan APIs du =
jour and find</FONT>
<BR><FONT SIZE=3D2>&gt;something else they want to carefully examine =
and tell us what they</FONT>
<BR><FONT SIZE=3D2>&gt;don't like about it.&nbsp; See</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp; <A =
HREF=3D"http://gee.cs.oswego.edu/dl/concurrent/index.html" =
TARGET=3D"_blank">http://gee.cs.oswego.edu/dl/concurrent/index.html</A><=
/FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C29FDF.79451890--