Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`Buffer<'_>` shouldn't be `Send`

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
静か
技術スタック
rust

調査の方向性

まず、next_buffer() 周辺の Buffer および Surface API を追跡し、presenting がスレッド移譲およびプラットフォームのロックとどのように関係するかに注目します。softbuffer PR #331 における Android の根拠を比較し、既存の Send と Sync の挙動を評価します。完了とは、Buffer のスレッドセーフ性に関する契約について明確な判断に到達し、それを記録または実装することです。

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

説明

bug DS - Android NDK

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

rust-windowing/softbuffer のほかの issue

rust-windowing/softbuffer の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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