dotnet / dotnet/reactive

AsyncRx.NET Delay does not delay completion (unlike normal Rx)

Open
#2,202 0 comments 0 reactions 0 assignees View on GitHub
[area] AsyncRx bug
Dominant language
C#
Stars
7.2k
Forks
798
PR merge metrics
No merged PRs in 30d

Description

#### Bug

This:

```cs
IAsyncObservable src = AsyncObservable.Empty().Delay(TimeSpan.FromSeconds(2));
```

behaves differently from this normal Rx equivalent:

```cs
IObservable src = Observable.Empty().Delay(TimeSpan.FromSeconds(2));
```

In both cases, the `Empty()` operator completes immediately upon subscription. The normal Rx version will delay the `OnCompleted` call by 2 seconds, but the AsyncRx.NET version completes immediately. The AsyncRx.NET `Delay` only delays `OnNextAsync` calls, and not `OnCompletedAsync` calls.

AsyncRx.NET behaviour here should be consistent with normal Rx.NET.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.