eclipse-platform / eclipse-platform/eclipse.platform
Make workspace capable of providing some Executor
- Dominant language
- Java
- Stars
- 165
- Forks
- 174
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 22
Description
Java CompletableFuture are often convenient. Recently the Display was well integrated with those by making `Display implements Executor`. Similarly, we should facilitate usage of future to deal with the workspace model; to replace WorkpaceJob and workspace.run().
I imagine the Workspace could provide an `.executor()` and another `.executor(ISchedulingRule)` method so one could write code of the form:
```java
CompletableFuture.supplyAsync(() -> computeAProjectDescriptionInWhateverThread()) // locks nothing by default
.thenAccept(projectDescription -> createProject(projectDescription), workspace.executor()) // locks the workspace, like workspace.run(), then free it
.thenAccept(project -> navigator.select(project), display); // locks the UI
```
Contributor guide
Assessment
This issue has not been assessed yet.