apache / apache/iotdb-client-csharp

Why doesn’t SessionDataSet implement the IAsyncDisposable interface?

Abierto
#54 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C#
Estrellas
24
Forks
6
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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;
}
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.