Thread safety of take!, put!
@seancorfield がすでに取り組んでいます。
2025年9月2日 から。
評価
この issue はまだ評価されていません。
説明
Hi,
Should we consider put! and take! threadsafe?
I have one thread doing puts in bursts at regular interval, and N workers on their own respective threads consuming the queue. Sometimes I get into a situation where I have 1 in progress task and all other workers waiting on tasks while the queue keeps growing (essentially deadlocked at this point). In the code I take!, deref and mark completed tasks immediately (did that to exclude a bug on complete!).
Should I serialize the takes or is this a potential bug? I ll try to come up with a repro at work tomorrow.
I also get the occasional negative in-progress while testing:
09:22:14.938 [clojure-agent-send-off-pool-0] INFO sink.testdq - {foo {:num-slabs 1, :num-active-slabs 1, :enqueued 10947, :retried 0, :completed 10947, :in-progress -1}}
Thanks for the lib by the way, it s super useful.
- 主要言語
- Clojure
- スター
- 407
- フォーク
- 30
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
clj-commons/durable-queue のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
clj-commons/durable-queue#31 ·
-
Slabs can grow larger than max-queue-size再び着手できるかも @seancorfield が 409 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンneeds analysis
clj-commons/durable-queue#18 · コメント 1 件 · 担当者 1 名 ·
-
When can a statistic be negative?再び着手できるかも @seancorfield が 409 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンneeds analysis
clj-commons/durable-queue#12 · コメント 6 件 · 担当者 1 名 ·
-
calling complete! on already completed task messes up stats再び着手できるかも @seancorfield が 409 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンneeds analysis
clj-commons/durable-queue#3 · コメント 2 件 · 担当者 1 名 ·
clj-commons/durable-queue の issue をすべて見る
似ている issue
-
worker/start rejects middleware supplied as a Var対応中かも @rajp152k が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Profiler (Remotery) leaks a socket for every connection that fails the WebSocket handshake対応中かも @rthery が 1 日前に担当しました。 オープンtriage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
IOP nitrate needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
category:tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信