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

未关闭
#667 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
r

调研方向

从内部 state 字段以及注明在 future 1.32.0 中添加的 $<-.Future 验证开始。检查 FutureResults 如何表示评估失败和中断,然后确定用于定义完成状态的标准化 state 值和后端行为。

由索引模型根据 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 小时
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

futureverse/future 的其他 Issue

查看 futureverse/future 的全部 Issue

相似的 Issue

更多 R Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。