File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 1- <?php
2-
3- declare (strict_types=1 );
1+ <?php declare (strict_types=1 );
42
53namespace ReactParallel \Streams ;
64
@@ -18,13 +16,13 @@ public function __construct(EventLoopBridge $loop)
1816 $ this ->loop = $ loop ;
1917 }
2018
21- public function stream (Channel $ channel ): Observable
19+ public function channel (Channel $ channel ): Observable
2220 {
2321 return $ this ->loop ->observe ($ channel );
2422 }
2523
2624 public function single (Channel $ channel ): PromiseInterface
2725 {
28- return $ this ->loop -> observe ($ channel )->take (1 )->toPromise ();
26+ return $ this ->channel ($ channel )->take (1 )->toPromise ();
2927 }
3028}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function recv(): void
4747
4848 $ promises = [];
4949 foreach ($ channels as $ channel ) {
50- $ promises [] = $ recvObservable ->stream ($ channel )->toArray ()->toPromise ();
50+ $ promises [] = $ recvObservable ->channel ($ channel )->toArray ()->toPromise ();
5151 }
5252
5353 $ rd = $ this ->await (all ($ promises ), $ loop , 3.3 );
You can’t perform that action at this time.
0 commit comments