RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/grpc/grpc

AGENTS.md

src/core/lib/iomgr/AGENTS.md
AGENTS.md

Quality

48/100

Scores the file, not the repository.

Length

654 words

6 headings · 0 code blocks

Repository

45k

— · pushed 0 days ago

Last changed

3 days ago

First indexed 3 days ago.
grpc/grpc/src/core/lib/iomgr/AGENTS.mdRawGitHub
1# I/O Manager (iomgr)
2 
3This directory contains the implementation of the gRPC I/O manager, a platform-abstraction layer for I/O and threading.
4 
5**NOTE:** The I/O manager is a legacy component that is being replaced by the [Event Engine](../event_engine/AGENTS.md). New code should use the Event Engine instead of the I/O manager.
6 
7## Overarching Purpose
8 
9The I/O manager is responsible for all of the I/O in gRPC's C-core. It provides a platform-independent abstraction layer for network I/O, timers, and asynchronous execution. It is designed to be highly scalable and performant, and it uses a variety of techniques to achieve this, including non-blocking I/O, event-driven programming, and a thread pool.
10 
11## Core Concepts
12 
13The I/O manager is built around a few key abstractions:
14 
15* **`grpc_endpoint`**: An endpoint is an abstraction for a communication channel, such as a TCP socket. It provides a platform-independent way to read and write data, and to register for I/O events.
16* **`grpc_closure`**: A closure is a callback function that is executed when an I/O event occurs. It is the basic unit of work in the I/O manager.
17* **`ExecCtx`**: An execution context is a thread-local object that is used to track a list of work that needs to be done. It provides a way to batch work together and to execute it in a specific order.
18* **`grpc_pollset`**: A pollset is a set of file descriptors that are being monitored for I/O events. The I/O manager uses pollsets to efficiently wait for I/O events on a large number of file descriptors.
19* **Threading Model**: The I/O manager uses a thread pool to execute closures. The number of threads in the pool is configurable, and the I/O manager can be configured to use a variety of different polling strategies, depending on the platform.
20 
21## Polling Strategies
22 
23The I/O manager supports several different polling strategies, which are used to wait for I/O events on different platforms:
24 
25* **`epoll`**: The `epoll` polling strategy is used on Linux. It is a highly scalable and efficient polling mechanism that can handle a large number of file descriptors.
26* **`poll`**: The `poll` polling strategy is used on most other POSIX-like systems. It is a more traditional polling mechanism that is not as scalable as `epoll`, but is more portable.
27* **`iocp`**: The `iocp` (I/O Completion Ports) polling strategy is used on Windows. It is a highly scalable and efficient polling mechanism that is similar to `epoll`.
28* **`cfstream`**: The `cfstream` polling strategy is used on Apple platforms (macOS, iOS). It is based on the Core Foundation `CFStream` API.
29 
30## Files
31 
32* **`iomgr.h`**: The public interface to the I/O manager. It provides functions for initializing and shutting down the I/O manager, and for scheduling work to be done.
33* **`endpoint.h`**: Defines the `grpc_endpoint` structure, which represents a communication channel.
34* **`closure.h`**: Defines the `grpc_closure` structure, which is used to represent a callback function.
35* **`exec_ctx.h`**: Defines the `ExecCtx` class, which represents an execution context.
36* **`timer.h`**: Defines the `grpc_timer` structure, which is used to represent a timer.
37* **`tcp_posix.h`, `tcp_windows.h`**: Platform-specific implementations of the TCP endpoint.
38* **`ev_epoll1_linux.cc`, `ev_poll_posix.cc`, `iocp_windows.cc`**: Platform-specific implementations of the polling strategies.
39* **`resolve_address.h`**: Provides a platform-independent way to resolve a hostname to a list of IP addresses.
40* **`combiner.h`**: A mechanism for serializing access to data that is shared between multiple threads.
41 
42## Notes
43 
44* The I/O manager is a low-level component of the gRPC stack. Most application developers will not need to interact with it directly.
45* The I/O manager is a complex piece of machinery, and it can be difficult to understand how all of the different pieces fit together. The best way to understand it is to read the code and to trace the execution of a simple RPC.
46* The `ExecCtx` is a particularly important concept to understand. It is used to manage the execution of closures, and it plays a key role in ensuring that the I/O manager is thread-safe.
47 

Sections

  • I/O Manager (iomgr)
  • Overarching Purpose
  • Core Concepts
  • Polling Strategies
  • Files
  • Notes

Stack — with the evidence

swift

(1.00)

csharp

(1.00)

cpp

(1.00)

python

(0.60)

ruby

(0.60)

php

(0.60)

dotnet

(0.60)

ruff

(0.60)

github-actions

(0.60)

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
grpc
Language
—
License
—
Archived
no

All configs in this repo

Also in grpc/grpc

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
grpc/grpcsrc/core/ext/filters/census/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections25/1003 days ago
grpc/grpcsrc/core/ext/filters/gcp_authentication/AGENTS.md · 45kAGENTS.mdswiftcsharp+7security44/1003 days ago
grpc/grpcsrc/core/ext/filters/http/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections44/1003 days ago
grpc/grpcsrc/core/ext/filters/stateful_session/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections44/1003 days ago
grpc/grpcsrc/core/ext/transport/chaotic_good/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections48/1003 days ago
grpc/grpcsrc/core/ext/transport/inproc/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections44/1003 days ago
grpc/grpcsrc/core/filter/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections44/1003 days ago
grpc/grpcsrc/core/handshaker/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections39/1003 days ago
grpc/grpcsrc/core/server/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections44/1003 days ago
grpc/grpcsrc/core/service_config/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections44/1003 days ago
grpc/grpcsrc/core/telemetry/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections39/1003 days ago
grpc/grpcsrc/core/transport/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections39/1003 days ago
grpc/grpcsrc/core/credentials/transport/AGENTS.md · 45kAGENTS.mdswiftcsharp+7security39/1003 days ago
grpc/grpcsrc/core/ext/filters/backend_metrics/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections44/1003 days ago
grpc/grpcsrc/core/credentials/AGENTS.md · 45kAGENTS.mdswiftcsharp+7security39/1003 days ago
grpc/grpcsrc/core/tsi/AGENTS.md · 45kAGENTS.mdswiftcsharp+7security39/1003 days ago
grpc/grpcsrc/core/tsi/alts/AGENTS.md · 45kAGENTS.mdswiftcsharp+7no sections39/1003 days ago
grpc/grpcsrc/core/credentials/call/AGENTS.md · 45kAGENTS.mdswiftcsharp+7security39/1003 days ago
grpc/grpcsrc/core/ext/transport/chttp2/AGENTS.md · 45kAGENTS.mdswiftcsharp+7testarchdependencies48/1003 days ago
grpc/grpcAGENTS.md · 45kAGENTS.mdswiftcsharp+7styledependenciesdo-not54/1003 days ago
Diff against src/core/ext/filters/census/AGENTS.md Diff against src/core/ext/filters/gcp_authentication/AGENTS.md Diff against src/core/ext/filters/http/AGENTS.md Diff against src/core/ext/filters/stateful_session/AGENTS.md Diff against src/core/ext/transport/chaotic_good/AGENTS.md Diff against src/core/ext/transport/inproc/AGENTS.md Diff against src/core/filter/AGENTS.md Diff against src/core/handshaker/AGENTS.md Diff against src/core/server/AGENTS.md Diff against src/core/service_config/AGENTS.md Diff against src/core/telemetry/AGENTS.md Diff against src/core/transport/AGENTS.md Diff against src/core/credentials/transport/AGENTS.md Diff against src/core/ext/filters/backend_metrics/AGENTS.md Diff against src/core/credentials/AGENTS.md Diff against src/core/tsi/AGENTS.md Diff against src/core/tsi/alts/AGENTS.md Diff against src/core/credentials/call/AGENTS.md Diff against src/core/ext/transport/chttp2/AGENTS.md Diff against AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
vllm-project/vllmAGENTS.md · 88kAGENTS.mdpythonpytorch+3setuptestlint-formatstyle+5100/1003 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
react/react-nativepackages/react-native-compatibility-check/AGENTS.md · 126kAGENTS.mdreactreact-native+11testlint-formatstylearch+499/1003 days ago
netdata/netdatasrc/go/plugin/ibm.d/AGENTS.md · 80kAGENTS.mddockerinfrastructure+7buildtestlint-formatarch+399/1003 days ago
dragonflydb/dragonflyAGENTS.md · 31kAGENTS.mdcppredis+6setupbuildtestlint-format+1096/1002 days ago
dotnet/aspnetcoresrc/Components/AGENTS.md · 38kAGENTS.mdcsharpdotnet+5buildteststylearch+396/1003 days ago
duckdb/duckdbAGENTS.md · 40kAGENTS.mdcppswift+1buildtestlint-formatstyle+896/100today
steipete/CodexBarAGENTS.md · 20kAGENTS.mdswiftgithub-actionsbuildteststylearch+493/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack