apache / apache/iotdb-client-csharp
Why doesn’t SessionDataSet implement the IAsyncDisposable interface?
- Lingua principale
- C#
- Stelle
- 24
- Fork
- 6
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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;
}
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.