eclipse-platform / eclipse-platform/eclipse.platform
Make workspace capable of providing some Executor
- Vorherrschende Sprache
- Java
- Sterne
- 165
- Forks
- 174
- Ø Merge
- 2 T. 8 Std.
- Gemergte PRs (30 T.)
- 22
Beschreibung
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
```
Beitragsleitfaden
Rechercherichtung
Beginnen Sie mit der Untersuchung der Workspace APIs und der bestehenden Verwendung von WorkspaceJob und workspace.run(), und vergleichen Sie diese anschließend mit Display, das Executor implementiert, sowie dem CompletableFuture-Beispiel im Issue. Ermitteln Sie, wie executor() und executor(ISchedulingRule) die Sperr- und Scheduling-Semantik des Workspace beibehalten sollten. Als abgeschlossen gilt die Aufgabe, wenn Design und Implementierung die vorgeschlagene Future-Kette unterstützen, ohne Workspace-Operationen unsynchronisiert zu lassen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- developer-experience
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100