Bcrdt's SingleThreadContext can throw ObjectDisposedException when a test ends

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

メンテナーはふだん 1 日以内に返信

@msynk がすでに取り組んでいます。

2026年12月4日 から。

評価

この issue はまだ評価されていません。

説明

In All Utilities CI (https://github.com/bitfoundation/bitplatform/actions/runs/47434187171, job 145395007763, net11.0), CollaborationStackTests.An_edit_in_one_client_reaches_another failed in SingleThreadTestMethodAttribute.ExecuteAsync:

System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Collections.Concurrent.BlockingCollection`1[...]'
   at System.Collections.Concurrent.BlockingCollection`1.CheckDisposed()
   at System.Collections.Concurrent.BlockingCollection`1.get_Count()
   at System.Collections.Concurrent.BlockingCollection`1.CompleteAdding()
   at Bit.Bcrdt.Tests.SingleThreadContext.Dispose() in SingleThreadContext.cs:line 120

SingleThreadContext.Run disposes its queue in a finally as soon as its consuming loop ends. CompleteAdding marks the queue complete before it reads Count, so the context's thread can see the queue complete and empty, leave the loop and dispose it while Dispose is still inside CompleteAdding on the test's thread. The test itself passed; the helper's teardown failed it.

主要言語
C#
スター
1.4k
フォーク
264
平均マージ
5時間 25分
マージ済み PR(30日)
447

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

bitfoundation/bitplatform のほかの issue

bitfoundation/bitplatform の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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