mirror of
https://github.com/denoland/deno.git
synced 2024-11-14 16:33:45 -05:00
ff932b411d
Currently all async ops are polled lazily, which means that op initialization code is postponed until control is yielded to the event loop. This has some weird consequences, e.g. ```js let listener = Deno.listen(...); let conn_promise = listener.accept(); listener.close(); // `BadResource` is thrown. A reasonable error would be `Interrupted`. let conn = await conn_promise; ``` JavaScript promises are expected to be eagerly evaluated. This patch makes ops actually do that. |
||
---|---|---|
.. | ||
integration | ||
testdata | ||
unit | ||
integration_tests.rs |