1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-12-03 13:07:50 +01:00

Fully make use of yield from and async-friendly stack traces

This commit is contained in:
Daniil Gentili 2020-01-31 20:33:18 +01:00
parent 2ba80af424
commit 3b8334e073
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -87,10 +87,10 @@ final class Coroutine implements Promise, \ArrayAccess
} else { } else {
$yielded = $this->generator->send($yielded); $yielded = $this->generator->send($yielded);
} }
}
if ($yielded instanceof self) { if ($yielded instanceof self) {
$yielded->parentCoroutine = $this; $yielded->parentCoroutine = $this;
} }
}
} catch (\Throwable $exception) { } catch (\Throwable $exception) {
$this->fail($exception); $this->fail($exception);
return; return;