Small API Tweak to Task (Worker)

Sven Reimers sven.reimers at
Mon Sep 2 09:13:17 PDT 2013


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

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.



Sven Reimers

* Senior Expert Software Architect
* NetBeans Dream Team Member:
* Community Leader  NetBeans:
                              Desktop Java:
* Duke's Choice Award Winner 2009
* Blog:

* LinkedIn:

Join the NetBeans Groups:
* LinkedIn:
* Oracle:

More information about the openjfx-dev mailing list