Small API Tweak to Task (Worker)
Sven Reimers
sven.reimers at gmail.com
Thu Oct 3 10:44:17 PDT 2013
What I probably was thinking about is task that written with the intention
that they should not be cancelled, e.g. calculations you want a result of.
It is not so much about you could not make them cancelable, but to show
this is not intended to be cancelled...
Hope I could clarify my train thought.
Thanks for listening
-Sven
On Thu, Sep 26, 2013 at 10:39 PM, Richard Bair <richard.bair at oracle.com>wrote:
> What are some examples of tasks that would not be cancelable?
>
> Richard
>
> On Sep 2, 2013, at 9:13 AM, Sven Reimers <sven.reimers at gmail.com> wrote:
>
> > Hi,
> >
> > I am trying to build a UI representation of a Task (using a ProgressBar
> and
> > other things).
> >
> > Since Tasks are cancellabe I thought about adding a button to cancel the
> > underlying Task. So far so good.
> >
> > Is there any reason why a Task can not express, if it is intended for the
> > task to act cooperative to a call to cancel? Something along the
> following
> > lines
> >
> > public boolean isCancellable() { return true; } // default
> >
> > This would enable users of the API to distinguish between Tasks which
> > really can be cancelled from those which just fulfill the API contract.
> >
> > Comments?
> >
> > -Sven
> >
> > --
> > Sven Reimers
> >
> > * Senior Expert Software Architect
> > * NetBeans Dream Team Member: http://dreamteam.netbeans.org
> > * Community Leader NetBeans: http://community.java.net/netbeans
> > Desktop Java:
> > http://community.java.net/javadesktop
> > * Duke's Choice Award Winner 2009
> > * Blog: http://nbguru.blogspot.com
> >
> > * XING: https://www.xing.com/profile/Sven_Reimers8
> > * LinkedIn: http://www.linkedin.com/in/svenreimers
> >
> > Join the NetBeans Groups:
> > * XING: http://www.xing.com/group-20148.82db20
> > * NUGM: http://haug-server.dyndns.org/display/NUGM/Home
> > * LinkedIn: http://www.linkedin.com/groups?gid=1860468
> > http://www.linkedin.com/groups?gid=107402
> > http://www.linkedin.com/groups?gid=1684717
> > * Oracle: https://mix.oracle.com/groups/18497
>
>
--
Sven Reimers
* Senior Expert Software Architect
* NetBeans Dream Team Member: http://dreamteam.netbeans.org
* Community Leader NetBeans: http://community.java.net/netbeans
Desktop Java:
http://community.java.net/javadesktop
* Duke's Choice Award Winner 2009
* Blog: http://nbguru.blogspot.com
* XING: https://www.xing.com/profile/Sven_Reimers8
* LinkedIn: http://www.linkedin.com/in/svenreimers
Join the NetBeans Groups:
* XING: http://www.xing.com/group-20148.82db20
* NUGM: http://haug-server.dyndns.org/display/NUGM/Home
* LinkedIn: http://www.linkedin.com/groups?gid=1860468
http://www.linkedin.com/groups?gid=107402
http://www.linkedin.com/groups?gid=1684717
* Oracle: https://mix.oracle.com/groups/18497
More information about the openjfx-dev
mailing list