`Buffer<'_>` shouldn't be `Send`
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
- 技术栈
- rust
调研方向
首先跟踪 next_buffer() 周围的 Buffer 和 Surface API,重点关注呈现与线程转移和平台锁定之间的关系。对比 softbuffer PR #331 中针对 Android 的理由,并评估现有的 Send 和 Sync 行为;完成的标准是就 Buffer 的线程安全契约达成明确决定,并将其记录下来或加以实现。
由索引模型根据 Issue 内容生成。
描述
Android holds a lock on the buffer while it's in use, see https://github.com/rust-windowing/softbuffer/pull/331, and I'm experimenting a bit with a similar design on macOS (which is to say, I think it's a reasonable thing for our buffers to do).
MutexGuards are not Send though, which makes me wonder if this is sound?
Is there a use-case for Buffer<'_> being Send? As-in, is there ever a case where you would want to present on a different thread than the one that called next_buffer()? The problem wouldn't exist if you moved the entire Surface to a different thread.
I can see the argument for buffers being Sync though (&mut T is Sync), it could maybe make sense to pass the buffer to a scoped thread and render in that.
- 主要语言
- Rust
- 星标
- 506
- 派生
- 84
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-windowing/softbuffer 的其他 Issue
-
DS - X11
难度 3/5 1-2 天 新手友好度 48/100
rust-windowing/softbuffer#368 ·
-
Needs Design Work
难度 5/5 一周以上 新手友好度 25/100
rust-windowing/softbuffer#342 · 1 条评论 ·
-
enhancement question
难度 5/5 一周以上 新手友好度 25/100
rust-windowing/softbuffer#338 ·
-
DS - Android NDK enhancement
难度 4/5 3-5 天 新手友好度 35/100
rust-windowing/softbuffer#318 · 2 条评论 ·
-
DS - Wayland DS - X11 question
难度 5/5 一周以上 新手友好度 25/100
rust-windowing/softbuffer#306 · 2 条评论 ·
查看 rust-windowing/softbuffer 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 68/100
trezor/trezor-firmware#7997 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
smol-machines/smolvm#1489 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复