I'm still working on the migration of our extensive business applications.
In our mars code we make liberal use of org.eclipse.core.runtime.jobs.Job, ServerJob, ClientSyncJob and ClientAsyncJob. I have easily migrated the first three of those to use the new Job-API.
However, I am uncertain how I should best replace a ClientAsyncJob.
Based on the Technical Guide (https://eclipsescout.github.io/6.0/technical-guide.html#jobmanager) I would guess that I'd replace the following code:
ClientSyncJob job = new ClientSyncJob("", session, true) {
@Override
protected void runVoid(IProgressMonitor monitor) throws Throwable {
doSomeStuff()
}
};
job.schedule();
with the following new code:
ModelJobs.schedule(new IRunnable() {
@Override
public void run() throws Exception {
doSomeStuff()
}
}, ModelJobs.newInput(ClientRunContexts.copyCurrent())
.withName("Doing something in model thread")).awaitDone();
Is that assumption correct?
[Updated on: Wed, 04 January 2017 07:51] by Moderator