apache / apache/iotdb-client-csharp

Why doesn’t SessionDataSet implement the IAsyncDisposable interface?

オープン
#54 コメント 1 件 リアクション 0 件 担当者 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;
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

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

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

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