apache / apache/iotdb-client-csharp

Why doesn’t SessionDataSet implement the IAsyncDisposable interface?

未關閉
#54 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C#
星號
24
分支
6
PR 合併指標
30 天內沒有已合併 PR

描述

Currently, SessionDataSet implements the IDisposable interface. However, in its Dispose() method, the asynchronous Close() method is invoked synchronously.

Actual implementation:
```csharp
protected virtual void Dispose(bool disposing)
{
if (this.disposedValue)
return;
if (disposing)
{
try
{
//synchronous call
this.Close().Wait();
}
catch
{
}
}
this.disposedValue = true;
}
```

Proposed implementation:
```csharp
protected virtual Task DisposeAsync(bool disposing)
{
if (this.disposedValue)
return;
if (disposing)
{
try
{
//asynchronous call
await this.Close();
}
catch
{
}
}
this.disposedValue = true;
}
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

定位 SessionDataSet,並檢查其現有的 IDisposable 實作,尤其是 Dispose() 和非同步 Close() 進入點。確認該類別支援非同步釋放,且在不變更現有同步釋放行為的情況下等待 Close() 完成;該 issue 未提供測試或檔案路徑,因此應針對兩條釋放路徑檢查完成情況。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp
領域
api
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。