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

オープン
#667 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
r

調査の方向性

内部の state フィールドと、future 1.32.0 で追加されたと記載されている $<-.Future の検証から始めます。FutureResults が評価の失敗と中断をどのように表現するかを確認し、そのうえで完了を定義する標準化された状態値とバックエンドの動作を特定します。

索引モデルが issue の本文から書いたものです。

説明

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]).
主要言語
R
スター
1k
フォーク
93
平均マージ
2日 4時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

futureverse/future のほかの issue

futureverse/future の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。