Community
Participate
Working Groups
Looking at the Jobs#create Javadoc it is unclear which method should be used: public static Job create(String name, final IJobFunction function) public static Job create(String name, final ICoreRunnable runnable) I suggest we add some Javadoc which method to use them.
Mikael, could you help here with a Gerrit for the Javadoc? I forgot which method we prefer. ;-)
Looking at the ICoreRunnable Javadoc I think create(String name, final ICoreRunnable runnable) is the "better" API, as I do not have to call done on the ProgressMonitor and it accepts null as ProgressMonitor. @Mikael, do you agree? In this case I can add, "Prefer using create(String name, final ICoreRunnable runnable)" to the Javadoc of create(String name, final IJobFunction function)
Mass change, please reset target if you still planning to fix this for 4.11.
(In reply to Lars Vogel from comment #2) > Looking at the ICoreRunnable Javadoc I think create(String name, final > ICoreRunnable runnable) is the "better" API, as I do not have to call done > on the ProgressMonitor and it accepts null as ProgressMonitor. > > @Mikael, do you agree? In this case I can add, "Prefer using create(String > name, final ICoreRunnable runnable)" to the Javadoc of create(String name, > final IJobFunction function) +1. It also have the advantage of relying on Exceptions (OperationCanceledException in this case, as reported by SubMonitor.split()) which is much easier than if (pm.isCanceled) { return Status.CANCELED_STATUS; } Feel free to add me as reviewer of a patch.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.runtime/+/169012
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.runtime/+/169013
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.runtime/+/169012 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=040e6b4019a8253cf167127520b27616d92f6f05
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.runtime/+/169013 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=cdb9e278c698dbd7db2fa6608ae54b146e753448