Backend API: Formally define the "state" of a future

Aperta
#667 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
r

Direzione di ricerca

Inizia con il campo interno state e la validazione di $<-.Future, indicata come aggiunta in future 1.32.0. Esamina il modo in cui FutureResults rappresenta gli errori e le interruzioni della valutazione, quindi determina i valori di stato standardizzati e il comportamento del backend che definirebbero il completamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Backend API documentation

The state of a future is stored in the internal state field, which takes a character string. Supported values are:

  • "created" - the future has been created, but not yet not launched
  • "running" - the future has been launched, and is assumed to be running
  • "finished" - the future has been successfully evaluated ("resolved"); results may or may not have been collected

It is to be decided if:

  • "failed" - evaluation of the future failed
  • "interrupted" - evaluation of the future was interrupted

should also be added to the above list. They are really not needed, because they could be inferred if we collect the FutureResults object and inspect that.

In the past, this was mostly specific to the future package, but with the move to a more generic backend solution (e.g. lazy futures are vanilla Future objects until launched, make it possible to relaunch failed Future objects, etc.) we need to tighten this up and standardize it.

  • I'll start by adding internal validation to the still, internal field state, to make sure it only takes known values, e.g. by creating a $<-.Future method. (Added to future 1.32.0 [2023-03-07]).
Lingua principale
R
Stelle
1k
Fork
93
Merge medio
2g 4h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di futureverse/future

Tutte le issue di futureverse/future

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.