MCPcopy Index your code
hub / github.com/chadaustin/batch-channel

github.com/chadaustin/batch-channel @v0.4.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.4.8 ↗ · + Follow
184 symbols 564 edges 11 files 25 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

async MPMC channel that reduces overhead by reading and writing many values at once.

Sometimes large volumes of small values are farmed out to workers through a channel. Consider directory traversal: each readdir() call produces a batch of directory entries. Batching can help the consumption side too. Consider querying SQLite with received values -- larger batches reduce the amortized cost of acquiring SQLite's lock and bulk queries can be issued.

One can imagine natural, currently unimplemented, extensions to this crate: * Channels with priority * impls for futures::sink::Sink and futures::stream::Stream

Ask if they would be helpful.

Extension points exported contracts — how you extend this code

UnboundedChannel (Interface)
(no doc) [5 implementers]
benches/async.rs
Channel (Interface)
(no doc) [3 implementers]
benches/throughput.rs
TestPool (Interface)
(no doc) [1 implementers]
tests/fixture.rs
ChannelSync (Interface)
(no doc) [3 implementers]
benches/throughput.rs
ChannelSender (Interface)
(no doc) [3 implementers]
benches/throughput.rs
ChannelBatchSender (Interface)
(no doc) [3 implementers]
benches/throughput.rs
ChannelReceiver (Interface)
(no doc) [3 implementers]
benches/throughput.rs

Core symbols most depended-on inside this repo

set
called by 32
tests/fixture.rs
spawn
called by 29
tests/fixture.rs
send
called by 28
src/lib.rs
bounded
called by 27
src/lib.rs
into_sync
called by 25
src/lib.rs
unbounded
called by 24
src/lib.rs
send_iter
called by 18
src/lib.rs
base
called by 13
src/lib.rs

Shape

Function 76
Method 62
Class 35
Interface 10
Enum 1

Languages

Rust100%

Modules by API surface

src/lib.rs59 symbols
benches/throughput.rs27 symbols
tests/unbounded.rs22 symbols
benches/async.rs18 symbols
tests/bounded.rs17 symbols
tests/api.rs13 symbols
tests/fixture.rs11 symbols
benches/uncontended.rs10 symbols
benches/alloc.rs5 symbols
tests/stream.rs1 symbols
tests/iterator.rs1 symbols

For agents

$ claude mcp add batch-channel \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact