Skip to main content

MAX_CONCURRENCY

Constant MAX_CONCURRENCY 

Source
pub const MAX_CONCURRENCY: usize = 50;
Expand description

Upper bound on MessagesApi::search_summaries’s concurrency parameter, regardless of what the caller (CLI --concurrency or the MCP concurrency param) requests.

Gmail’s quota is 250 units/user/second and messages.get costs 5 units, so more than 50 requests in flight at once already assumes every one completes within a second — the flag exists to bound the fan-out against that quota, so it shouldn’t itself accept a value that can blow past it.