Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mordant-baseline.toml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@

[bun_threading]
"unsafe_send_covers_more_than_pointers:src/threading/Semaphore.rs" = 1
"unsafe_send_covers_more_than_pointers:src/threading/channel.rs" = 1

[bun_uws_sys]
"unused_pub:src/uws_sys/Loop.rs" = 2
Expand Down
11 changes: 1 addition & 10 deletions src/http/AsyncHTTP.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,7 @@ impl<'a> AsyncHTTP<'a> {
// ──────────────────────────────────────────────────────────────────────────

// 32 pointers much cheaper than 1000 pointers
// Note: `bun_threading::Channel` requires `T: Copy`, which
// `HTTPClientResult` is not. `send_sync` is a one-shot blocking handoff, so a
// `send_sync` is a one-shot blocking handoff, so a
// Guarded<Option<T>>+Condvar is the exact semantics needed.
pub(crate) struct SingleHTTPChannel {
slot: bun_threading::Guarded<Option<HTTPClientResult<'static>>>,
Expand Down Expand Up @@ -864,11 +863,3 @@ impl<'a> AsyncHTTP<'a> {
self.client.start(body);
}
}

// ──────────────────────────────────────────────────────────────────────────
// HTTPCallbackPair / HTTPChannel / HTTPChannelContext
// ──────────────────────────────────────────────────────────────────────────

// `bun_threading::Channel` requires `T: Copy`, which `HTTPClientResult` is not, so the
// `HTTPChannel` here boxes the pair and ships the pointer (which IS `Copy`) through
// a static-buffer channel. The receiver takes ownership of the Box.
3 changes: 1 addition & 2 deletions src/http/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,7 @@ pub struct HTTPClientResult<'a> {
pub body: &'a [u8],
/// Populated only on the terminal (`!has_more`) progress callback:
/// `send_progress_update_*` moves the whole `decoded_body.list` here so
/// one-shot consumers (`send_sync`, `NetworkTask` manifest, S3 simple,
/// `RemoteImageDownload`) can `mem::take` it instead of
/// one-shot consumers (`send_sync`, `NetworkTask` manifest, S3 simple) can `mem::take` it instead of
/// `extend_from_slice`ing the borrowed `body`. Streaming consumers read
/// `body` on non-terminal callbacks and treat this as just the final
/// chunk's bytes.
Expand Down
Loading
Loading