Semaphore use in signals
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
ファイルやテストは指定されていません。まず、interprocess_semaphore が使用するセマフォ実装、特に spin パスと POSIX パス、および timed_wait が SIGINT とどのように相互作用するかを追跡してください。プロジェクトで、例外を送出しない POSIX post と、コンパイル時のシグナル安全性に関する情報について設計が確定していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I am using interprocess' semaphore in conjunction with timed_wait, and I need to be able to handle SIGINT to terminate the waiting early. Looking into the implementation, I can see that I am getting the spin semaphore internally, which suggests to me that post()ing it from the signal handler is safe, since it is effectively just an atomic increment.
This would likely not hold in other types of internal implementations of the semaphore. For example, while POSIX implementation seems to be fine in the first line (it just uses sem_post), it can later throw an exception.
This leads me to two thoughts:
- Can we have a variant of the POSIX post() that would not throw an exception?
- Can we add compile-time introspection for signal safety of the chosen semaphore implementation? So that one can do something like
static_assert(boost::interprocess::interprocess_semaphore::signal_safe_post).
I am happy to contribute such improvements if there's a consensus.
- 主要言語
- C++
- スター
- 185
- フォーク
- 131
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
boostorg/interprocess のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
boostorg/interprocess#196 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
boostorg/interprocess#279 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
boostorg/interprocess#274 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
boostorg/interprocess#268 · コメント 4 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 32/100
boostorg/interprocess#253 ·
boostorg/interprocess の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
AXERA-TECH/ax-llm#77 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
games-on-whales/wolf#509 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
bug-unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100