apache / apache/iotdb-client-csharp
Why doesn’t SessionDataSet implement the IAsyncDisposable interface?
- Langage dominant
- C#
- Étoiles
- 24
- Forks
- 6
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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;
}
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Locate SessionDataSet and inspect its existing IDisposable implementation, especially Dispose() and the asynchronous Close() entry point. Confirm the class supports asynchronous disposal and that Close() is awaited without changing the existing synchronous disposal behavior; the issue provides no test or file path, so completion should be checked against both disposal paths.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp
- Domaine
- api
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100