@@ 88-96 (lines=9) @@ | ||
85 | ||
86 | private function delegateCall(Call $call): void |
|
87 | { |
|
88 | foreach ($this->callerState as $qcHash => $state) { |
|
89 | if ($state->getState() !== State::WAITING) { |
|
90 | continue; |
|
91 | } |
|
92 | ||
93 | $this->callerStream[$qcHash]->onNext($call); |
|
94 | ||
95 | return; |
|
96 | } |
|
97 | ||
98 | $this->state->onNext(State::BUSY); |
|
99 | $this->queue[] = $call; |
@@ 56-64 (lines=9) @@ | ||
53 | ||
54 | private function delegateCall(Call $call): void |
|
55 | { |
|
56 | foreach ($this->callerState as $qcHash => $state) { |
|
57 | if ($state->getState() === State::BUSY && $state->getState() !== State::DONE) { |
|
58 | continue; |
|
59 | } |
|
60 | ||
61 | $this->callerStream[$qcHash]->onNext($call); |
|
62 | ||
63 | return; |
|
64 | } |
|
65 | ||
66 | $this->state->onNext(State::BUSY); |
|
67 | $this->setUpCaller(); |