1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-10 08:09:06 -05:00
denoland-deno/ext
Laurence Rowe 8fcea5966c
refactor(ext/http): use scopeguard defer to handle async drop (#20652)
Use the [scopeguard](https://docs.rs/scopeguard/) defer macro to run
cleanup code for `new_slab_future`.
This means it can be a single async function, avoiding the need to
create a struct and implement `PinnedDrop`

Async cleanup in Rust is awkward because async functions may be
cancelled at any await point when their Future is dropped.
The scopeguard approach comes from the following articles:
* [How to think about `async`/`await` in
Rust](http://cliffle.com/blog/async-inversion/)
* [Async Cancellation
I](https://blog.yoshuawuyts.com/async-cancellation-1/) (Reddit
[discussion](https://www.reddit.com/r/rust/comments/qrhg39/blog_post_async_cancellation/))
2023-09-26 05:42:48 -06:00
..
broadcast_channel refactor: rewrite BC, cache exts to op2 (#20486) 2023-09-19 20:39:27 -06:00
cache refactor: rewrite ops using i64/usize to op2 (#20647) 2023-09-23 14:04:47 +02:00
console 1.37.0 (#20574) 2023-09-19 20:29:17 +00:00
crypto refactor: rewrite some ops to op2 macro (#20603) 2023-09-21 08:08:23 -06:00
fetch refactor: rewrite ops using i64/usize to op2 (#20647) 2023-09-23 14:04:47 +02:00
ffi 1.37.0 (#20574) 2023-09-19 20:29:17 +00:00
fs refactor: rewrite more ops to op2 (#20666) 2023-09-24 22:07:22 +00:00
http refactor(ext/http): use scopeguard defer to handle async drop (#20652) 2023-09-26 05:42:48 -06:00
io 1.37.0 (#20574) 2023-09-19 20:29:17 +00:00
kv feat(kv_queues): increase max queue delay to 30 days (#20626) 2023-09-22 09:40:35 -07:00
napi refactor: rewrite ops to op2 macro (#20628) 2023-09-23 19:33:31 +00:00
net refactor: rewrite more ops to op2 (#20666) 2023-09-24 22:07:22 +00:00
node fix(ext/node): Fix invalid length variable reference in blitBuffer (#20648) 2023-09-24 13:48:23 +03:00
tls 1.37.0 (#20574) 2023-09-19 20:29:17 +00:00
url 1.37.0 (#20574) 2023-09-19 20:29:17 +00:00
web fix(ext/http): ensure that resources are closed when request is cancelled (#20641) 2023-09-25 17:23:55 +02:00
webidl 1.37.0 (#20574) 2023-09-19 20:29:17 +00:00
websocket 1.37.0 (#20574) 2023-09-19 20:29:17 +00:00
webstorage 1.37.0 (#20574) 2023-09-19 20:29:17 +00:00