eclipse-platform / eclipse-platform/eclipse.platform
Make workspace capable of providing some Executor
- Lingua principale
- Java
- Stelle
- 165
- Fork
- 174
- Merge medio
- 2g 8h
- PR unite (30g)
- 22
Descrizione
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
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Iniziare esaminando le Workspace APIs e l’uso esistente di WorkspaceJob e workspace.run(), quindi confrontarli con Display, che implementa Executor, e con l’esempio di CompletableFuture nell’issue. Determinare come executor() ed executor(ISchedulingRule) debbano preservare la semantica di locking e scheduling del workspace. Il lavoro è completo quando la progettazione e l’implementazione supportano la catena di future proposta senza lasciare non sincronizzate le operazioni del workspace.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- developer-experience
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100