Conversation
Contributor
|
Are you migrating to Eio or adding it as an option? |
Owner
Author
|
Adding it as an option.
|
169c19b to
d9c0f94
Compare
provides a tiny_httpd server that relies on Eio for non-blocking sockets and for concurrency using eio fibers.
d9c0f94 to
94ed68c
Compare
- Add closed flag to ic_of_flow/oc_of_flow to prevent double-release of pool cstructs and double-shutdown - Enforce max_connections with Eio.Semaphore to limit concurrent connections - Fix port 0 detection using Eio.Net.listening_addr to return actual port - Use pool_size for cstruct pool max_size (was computed but unused) - Set TCP_NODELAY on accepted connections for low latency
- small_list -> list_small - bytes_of_size -> bytes_size - small_nat -> nat_small - prefix unused Frame_type constants with underscore
bbeece1 to
32421a2
Compare
- Acquire semaphore BEFORE spawning handler fiber: replace Eio.Net.accept_fork with manual accept + Semaphore.acquire + Fiber.fork so we bound the number of in-flight fibers rather than spawning unlimited fibers that all block on the semaphore. - Graceful stop: remove Eio.Switch.fail sw Exit from stop(), just set running to false so existing handlers can complete naturally instead of being cancelled immediately. - Replace Unix.gettimeofday with Eio.Time.now clock to use the Eio clock abstraction instead of direct Unix calls.
* eio-fixes: eio: add 60s shutdown backstop, protect Flow.close from raising eio: fix semaphore acquisition, graceful stop, and time source
c-cube
added a commit
to c-cube/opam-repository
that referenced
this pull request
Feb 16, 2026
CHANGES: - eio backend, second try (c-cube/tiny_httpd#95) - hardening bugfixes - feat WS: abstraction for critical section - feat route: add `to_url`, to produce a URL path from a route - fix some warnings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this simply adds a Eio backend to tiny_httpd, for cooperative concurrency.