Skip to content

Commit

Permalink
update(Blocking*): remove context cancellation detection
Browse files Browse the repository at this point in the history
  • Loading branch information
b97tsk committed Jan 21, 2024
1 parent fe5c143 commit abc8fa2
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions blocking.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ func (obs Observable[T]) BlockingFirst(ctx context.Context) (v T, err error) {

wg.Wait()

select {
default:
case <-ctx.Done():
return v, ctx.Err()
}

switch res.Kind {
case KindNext:
return res.Value, nil
Expand Down Expand Up @@ -129,12 +123,6 @@ func (obs Observable[T]) BlockingLast(ctx context.Context) (v T, err error) {

wg.Wait()

select {
default:
case <-ctx.Done():
return v, ctx.Err()
}

switch res.Kind {
case KindNext:
return res.Value, nil
Expand Down Expand Up @@ -225,12 +213,6 @@ func (obs Observable[T]) BlockingSingle(ctx context.Context) (v T, err error) {

wg.Wait()

select {
default:
case <-ctx.Done():
return v, ctx.Err()
}

switch res.Kind {
case KindNext:
return res.Value, nil
Expand Down

0 comments on commit abc8fa2

Please sign in to comment.