deno/ext
Matt Mastracci 68a0877f8d
fix(ext/http): avoid lockup in graceful shutdown (#21253)
Follow-up to #20822. cc @lrowe 

The `httpServerExplicitResourceManagement` tests were randomly failing
on CI because of a race.

The `drain` waker was missing wakeup events if the listeners shut down
after the last HTTP response finished. If we lost the race (rare), the
server Rc would be dropped and we wouldn't poll it again.

This replaces the drain waker system with a signalling Rc that always
resolves when the refcount is about to become 1.

Fix verified by running serve tests in a loop:

```
for i in {0..100}; do cargo run --features=__http_tracing -- test
 -A --unstable '/Users/matt/Documents/github/deno/deno/cli/tests/unit/ser
ve_test.ts' --filter httpServerExplicitResourceManagement; done;
```
2023-11-23 16:39:17 +00:00
..
broadcast_channel fix(ext,runtime): add missing custom inspections (#21219) 2023-11-19 09:13:38 +01:00
cache fix(ext,runtime): add missing custom inspections (#21219) 2023-11-19 09:13:38 +01:00
console chore: forward v1.38.2 release commit to main (#21236) 2023-11-17 17:57:25 +09:00
cron chore: forward v1.38.2 release commit to main (#21236) 2023-11-17 17:57:25 +09:00
crypto fix(ext,runtime): add missing custom inspections (#21219) 2023-11-19 09:13:38 +01:00
fetch fix(ext,runtime): add missing custom inspections (#21219) 2023-11-19 09:13:38 +01:00
ffi chore: forward v1.38.2 release commit to main (#21236) 2023-11-17 17:57:25 +09:00
fs chore: forward v1.38.2 release commit to main (#21236) 2023-11-17 17:57:25 +09:00
http fix(ext/http): avoid lockup in graceful shutdown (#21253) 2023-11-23 16:39:17 +00:00
io fix(ext/node): handle closing process.stdin more than once (#21267) 2023-11-20 18:57:18 +05:30
kv chore: forward v1.38.2 release commit to main (#21236) 2023-11-17 17:57:25 +09:00
napi chore: forward v1.38.2 release commit to main (#21236) 2023-11-17 17:57:25 +09:00
net chore: forward v1.38.2 release commit to main (#21236) 2023-11-17 17:57:25 +09:00
node fix(ext/node): fix node:stream.Writable (#21297) 2023-11-23 09:57:05 +09:00
tls chore: forward v1.38.2 release commit to main (#21236) 2023-11-17 17:57:25 +09:00
url fix(ext/url): add deno_console dependency for bench (#21266) 2023-11-20 14:01:30 +01:00
web fix(ext,runtime): add missing custom inspections (#21219) 2023-11-19 09:13:38 +01:00
webidl chore: forward v1.38.2 release commit to main (#21236) 2023-11-17 17:57:25 +09:00
websocket fix(ext,runtime): add missing custom inspections (#21219) 2023-11-19 09:13:38 +01:00
webstorage fix(ext,runtime): add missing custom inspections (#21219) 2023-11-19 09:13:38 +01:00