# \#eio

**URL:** https://discuss.ocaml.org/tag/eio/577.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Monadic abstraction for using Eio Executor pool](https://discuss.ocaml.org/t/monadic-abstraction-for-using-eio-executor-pool/18473)

<div class="topic-metadata">

**Author:** [@kentookura](https://discuss.ocaml.org/u/kentookura)\
**Replies:** 8\
**Last updated:** [August 26, 2026, 6:37am UTC](https://discuss.ocaml.org/t/monadic-abstraction-for-using-eio-executor-pool/18473 "2026-08-26T06:37:32Z")

</div>

I was looking at elm’s Task module and was wondering if I could hide some of the implementation details in my code which heavily uses Eio for parallelism. It turns out this can be done: (Not sure about the word choice…

---

## [\[ANN\] Eio 1.4 (effects-based concurrency library)](https://discuss.ocaml.org/t/ann-eio-1-4-effects-based-concurrency-library/18391)

<div class="topic-metadata">

**Author:** [@talex5](https://discuss.ocaml.org/u/talex5)\
**Replies:** 0\
**Last updated:** [July 25, 2026, 2:37pm UTC](https://discuss.ocaml.org/t/ann-eio-1-4-effects-based-concurrency-library/18391 "2026-07-25T14:37:34Z")

</div>

Eio 1.4 is now released and available from opam-repository. About Eio Eio provides an effects-based direct-style IO stack for OCaml 5. For example, you can use Eio to read and write files, make network connections, or p…

---

## [Why Ocsigen is staying on Lwt (for now)](https://discuss.ocaml.org/t/why-ocsigen-is-staying-on-lwt-for-now/18318)

<div class="topic-metadata">

**Author:** [@Vincent\_Balat](https://discuss.ocaml.org/u/Vincent_Balat)\
**Replies:** 37\
**Last updated:** [July 17, 2026, 10:50pm UTC](https://discuss.ocaml.org/t/why-ocsigen-is-staying-on-lwt-for-now/18318 "2026-07-17T22:50:36Z")

</div>

Over 2025 we migrated the whole Ocsigen stack (ocsigenserver, Eliom, ocsigen-toolkit, ocsigen-start) from Lwt to Eio. The migration compiles and the test suite passes. We have nonetheless decided not to release it and to…

---

## [\[Ann\] lwt-to-eio: Automating the mechanical parts of Lwt -\> Eio migration](https://discuss.ocaml.org/t/ann-lwt-to-eio-automating-the-mechanical-parts-of-lwt-eio-migration/17696)

<div class="topic-metadata">

**Author:** [@oug-t](https://discuss.ocaml.org/u/oug-t)\
**Replies:** 6\
**Last updated:** [January 15, 2026, 7:13pm UTC](https://discuss.ocaml.org/t/ann-lwt-to-eio-automating-the-mechanical-parts-of-lwt-eio-migration/17696 "2026-01-15T19:13:35Z")

</div>

Hi everyone, Like many of you, I’ve been looking into migrating my libraries from Lwt to Eio to take advantage of OCaml 5’s direct-style concurrency. While the manual migration guides are excellent, I found myself makin…

---

## [Waiting in Eio for socket data without reading it](https://discuss.ocaml.org/t/waiting-in-eio-for-socket-data-without-reading-it/17615)

<div class="topic-metadata">

**Author:** [@vog](https://discuss.ocaml.org/u/vog)\
**Replies:** 1\
**Last updated:** [December 20, 2025, 2:35pm UTC](https://discuss.ocaml.org/t/waiting-in-eio-for-socket-data-without-reading-it/17615 "2025-12-20T14:35:11Z")

</div>

I’d like to wrap a C library for use within Eio code. That library opens a network connection on its own, but I’m able to fetch the file descriptor of the open socket. It even operates in non-blocking mode. But how do I…

---

## [How to stream data in cohttp\_eio server](https://discuss.ocaml.org/t/how-to-stream-data-in-cohttp-eio-server/17558)

<div class="topic-metadata">

**Author:** [@eWert-Online](https://discuss.ocaml.org/u/eWert-Online)\
**Replies:** 21\
**Last updated:** [December 7, 2025, 10:21am UTC](https://discuss.ocaml.org/t/how-to-stream-data-in-cohttp-eio-server/17558 "2025-12-07T10:21:36Z")

</div>

Hello :waving\_hand: I am trying to implement Server Sent Events with Cohttp\_eio. The theory is pretty simple: Stream data periodically to the client. But I am not sure, how I can send data to a Eio.Flow.source\_ty (whic…

---

## [How to safely take from multiple Eio streams?](https://discuss.ocaml.org/t/how-to-safely-take-from-multiple-eio-streams/17405)

<div class="topic-metadata">

**Author:** [@derekchiang](https://discuss.ocaml.org/u/derekchiang)\
**Replies:** 3\
**Last updated:** [October 18, 2025, 10:31pm UTC](https://discuss.ocaml.org/t/how-to-safely-take-from-multiple-eio-streams/17405 "2025-10-18T22:31:13Z")

</div>

I’m new to concurrency programming in OCaml and I’m currently playing with Eio streams, which I understand are similar to channels in Go. In Go, if I have multiple channels to receive from, I would use select like this: …

---

## [An impressive macrobenchmark for eio](https://discuss.ocaml.org/t/an-impressive-macrobenchmark-for-eio/17344)

<div class="topic-metadata">

**Author:** [@conroj](https://discuss.ocaml.org/u/conroj)\
**Replies:** 3\
**Last updated:** [October 8, 2025, 12:42am UTC](https://discuss.ocaml.org/t/an-impressive-macrobenchmark-for-eio/17344 "2025-10-08T00:42:31Z")

</div>

While wandering around the web I came across a link to a slide deck by our own @kayceesrk. On slide #35 is a macrobenchmark showing an EIO-based network server, and its throughput is pretty favorable compared to the Rust…

---

## [Naive implementation of Cyclic barrier](https://discuss.ocaml.org/t/naive-implementation-of-cyclic-barrier/17299)

<div class="topic-metadata">

**Author:** [@Mohan\_Radhakrishnan](https://discuss.ocaml.org/u/Mohan_Radhakrishnan)\
**Replies:** 2\
**Last updated:** [September 23, 2025, 5:47am UTC](https://discuss.ocaml.org/t/naive-implementation-of-cyclic-barrier/17299 "2025-09-23T05:47:56Z")

</div>

Hi The Cyclicbarrier (The code is here. ) is ported from Go. It is an exercise as I am aware that concurrency primitives are notoriously difficult to create. But my simple test seems to work. The await function which …

---

## [How to create an \`Eio.Path\` by hand for testing?](https://discuss.ocaml.org/t/how-to-create-an-eio-path-by-hand-for-testing/16739)

<div class="topic-metadata">

**Author:** [@nikochiko](https://discuss.ocaml.org/u/nikochiko)\
**Replies:** 2\
**Last updated:** [May 31, 2025, 4:34pm UTC](https://discuss.ocaml.org/t/how-to-create-an-eio-path-by-hand-for-testing/16739 "2025-05-31T16:34:55Z")

</div>

One of the functions in my library takes an argument of type \[\`Dir\] Eio.Path.t. I want to be able to test this. I am struggling to come up with a way to craft this type by hand from a string. I could not find an alterna…

---

## [Eio - attach a handler between the fn finishes and forks are awaited](https://discuss.ocaml.org/t/eio-attach-a-handler-between-the-fn-finishes-and-forks-are-awaited/16473)

<div class="topic-metadata">

**Author:** [@wokalski](https://discuss.ocaml.org/u/wokalski)\
**Replies:** 2\
**Last updated:** [May 9, 2025, 11:50am UTC](https://discuss.ocaml.org/t/eio-attach-a-handler-between-the-fn-finishes-and-forks-are-awaited/16473 "2025-05-09T11:50:23Z")

</div>

Hi, we have an Eio based http2/grpc client. Let’s assume we are creating a tcp socket in a switch, and when that switch finishes we want to wait for all writes to finish and write a Goaway to the other side, something an…

---

## [Lwt multi-processing much more performant than eio multi-core?](https://discuss.ocaml.org/t/lwt-multi-processing-much-more-performant-than-eio-multi-core/16395)

<div class="topic-metadata">

**Author:** [@rbjorklin](https://discuss.ocaml.org/u/rbjorklin)\
**Replies:** 10\
**Last updated:** [April 2, 2025, 4:12am UTC](https://discuss.ocaml.org/t/lwt-multi-processing-much-more-performant-than-eio-multi-core/16395 "2025-04-02T04:12:11Z")

</div>

I took a stab at porting the existing httpaf implementation used in the TechEmpowerBenchmarks to use httpun and eio in this PR. To my great surprise I’m finding that Lwt manages ~2x the throughput at 1/10th of the laten…

---

## [Recording of "Porting Lwt applications to OCaml 5 and Eio"?](https://discuss.ocaml.org/t/recording-of-porting-lwt-applications-to-ocaml-5-and-eio/13241)

<div class="topic-metadata">

**Author:** [@enetsee](https://discuss.ocaml.org/u/enetsee)\
**Replies:** 3\
**Last updated:** [March 20, 2025, 7:57pm UTC](https://discuss.ocaml.org/t/recording-of-porting-lwt-applications-to-ocaml-5-and-eio/13241 "2025-03-20T19:57:53Z")

</div>

Is there a recording of the Porting Lwt applications to OCaml 5 and Eio tutorial given at ICFP’23? I’ve trawled the youtube playlist but couldn’t find it…

---

## [Invalid cross-device link when using Eio.Path.load](https://discuss.ocaml.org/t/invalid-cross-device-link-when-using-eio-path-load/15997)

<div class="topic-metadata">

**Author:** [@kentookura](https://discuss.ocaml.org/u/kentookura)\
**Replies:** 5\
**Last updated:** [January 21, 2025, 11:33am UTC](https://discuss.ocaml.org/t/invalid-cross-device-link-when-using-eio-path-load/15997 "2025-01-21T11:33:34Z")

</div>

I am getting the following error when using Eio.Path.load: Fatal error: exception Eio.Io Fs Permission\_denied Unix\_error (Invalid cross-device link, "openat2", ""), examining \<cwd:./trees/index.tree\> As far as I ca…

---

## [Multiple domains design question in Eio/etc](https://discuss.ocaml.org/t/multiple-domains-design-question-in-eio-etc/15861)

<div class="topic-metadata">

**Author:** [@yawaramin](https://discuss.ocaml.org/u/yawaramin)\
**Replies:** 7\
**Last updated:** [January 5, 2025, 6:35am UTC](https://discuss.ocaml.org/t/multiple-domains-design-question-in-eio-etc/15861 "2025-01-05T06:35:00Z")

</div>

I have an app design question regarding the use of multiple domains in say Eio or some other multicore library. We can do eg let num\_domains = Domain.recommended\_domain\_count () - 1 let additional\_domains = Eio.Stdenv.d…

---

## [Eio Unix.EADDRNOTAVAIL on socket bind!?](https://discuss.ocaml.org/t/eio-unix-eaddrnotavail-on-socket-bind/15809)

<div class="topic-metadata">

**Author:** [@H-ANSEN](https://discuss.ocaml.org/u/H-ANSEN)\
**Replies:** 11\
**Last updated:** [December 18, 2024, 7:24pm UTC](https://discuss.ocaml.org/t/eio-unix-eaddrnotavail-on-socket-bind/15809 "2024-12-18T19:24:08Z")

</div>

Hello all! I was having some issues when making use of the Eio library, specifically when attempting to create a UDP socket and sending data. As a proof of concept, I went ahead and wrote out the Unix code by hand to try…

---

## [\[ANN\] capnp-rpc 2.0](https://discuss.ocaml.org/t/ann-capnp-rpc-2-0/15739)

<div class="topic-metadata">

**Author:** [@talex5](https://discuss.ocaml.org/u/talex5)\
**Replies:** 0\
**Last updated:** [December 3, 2024, 11:35am UTC](https://discuss.ocaml.org/t/ann-capnp-rpc-2-0/15739 "2024-12-03T11:35:28Z")

</div>

I’m pleased to announce the release of capnp-rpc 2.0, an OCaml implementation of the Cap’n Proto RPC specification. If you haven’t used the library before, please see the documentation and tutorial. Cap’n Proto RPC aims…

---

## [Cancel Eio Timer](https://discuss.ocaml.org/t/cancel-eio-timer/15638)

<div class="topic-metadata">

**Author:** [@Mohan\_Radhakrishnan](https://discuss.ocaml.org/u/Mohan_Radhakrishnan)\
**Replies:** 2\
**Last updated:** [November 21, 2024, 1:38pm UTC](https://discuss.ocaml.org/t/cancel-eio-timer/15638 "2024-11-21T13:38:24Z")

</div>

Hi, I have this primitive timer mechanism that loops forever. This is like a notification when Eio.Condition is set. let rec periodic\_timer () = Eio\_main.run @@ fun env -\> let timeout\_duration = election\_timeou…

---

## [The status of eio and effects composition](https://discuss.ocaml.org/t/the-status-of-eio-and-effects-composition/15513)

<div class="topic-metadata">

**Author:** [@mefyl](https://discuss.ocaml.org/u/mefyl)\
**Replies:** 18\
**Last updated:** [November 13, 2024, 10:16pm UTC](https://discuss.ocaml.org/t/the-status-of-eio-and-effects-composition/15513 "2024-11-13T22:16:02Z")

</div>

While eio looks very promising, there is a massive showstopper for us (Routine) which is that, in my perception, it is hardly interoperable with other effects. There has been a discussion were I have explained my vision …

---

## [Eio fiber hangs instead of "index out of bounds" exception: bug or feature?](https://discuss.ocaml.org/t/eio-fiber-hangs-instead-of-index-out-of-bounds-exception-bug-or-feature/15511)

<div class="topic-metadata">

**Author:** [@yashrk](https://discuss.ocaml.org/u/yashrk)\
**Replies:** 6\
**Last updated:** [October 28, 2024, 9:19am UTC](https://discuss.ocaml.org/t/eio-fiber-hangs-instead-of-index-out-of-bounds-exception-bug-or-feature/15511 "2024-10-28T09:19:47Z")

</div>

Hi. I’ve noticed some strange behavior in Eio fibers. Consider the following simple program: let producer stream = while true do Eio.Stream.add stream "asdfasdfasdf\\n" done let consumer stream = while true d…

---

## [Make eio server/client wait for an event](https://discuss.ocaml.org/t/make-eio-server-client-wait-for-an-event/15508)

<div class="topic-metadata">

**Author:** [@Mohan\_Radhakrishnan](https://discuss.ocaml.org/u/Mohan_Radhakrishnan)\
**Replies:** 5\
**Last updated:** [October 27, 2024, 8:28am UTC](https://discuss.ocaml.org/t/make-eio-server-client-wait-for-an-event/15508 "2024-10-27T08:28:20Z")

</div>

Hi, My attempt to create a reactive, event-driven server and client isn’t correct. I just try to loop recursively. My intention is to make the server and client react to a message and send an acknowledgement. I plan to…

---

## [OCaml 5 performance](https://discuss.ocaml.org/t/ocaml-5-performance/15014)

<div class="topic-metadata">

**Author:** [@talex5](https://discuss.ocaml.org/u/talex5)\
**Replies:** 30\
**Last updated:** [September 11, 2024, 1:06pm UTC](https://discuss.ocaml.org/t/ocaml-5-performance/15014 "2024-09-11T13:06:52Z")

</div>

I’ve been trying out some tools to investigate performance problems in my OCaml programs and I’ve written up my experiences here in case other people find it useful: OCaml 5 performance problems - Thomas Leonard's blog …

---

## [Best practices and design patterns for supporting concurrent IO in libraries](https://discuss.ocaml.org/t/best-practices-and-design-patterns-for-supporting-concurrent-io-in-libraries/15001)

<div class="topic-metadata">

**Author:** [@zoj613](https://discuss.ocaml.org/u/zoj613)\
**Replies:** 6\
**Last updated:** [September 9, 2024, 3:34am UTC](https://discuss.ocaml.org/t/best-practices-and-design-patterns-for-supporting-concurrent-io-in-libraries/15001 "2024-09-09T03:34:39Z")

</div>

I am interested in learning about the best practices and recommended design patterns in 2024 for supporting concurrent IO in libraries. I noticed that several libraries release two packages, one using synchorious IO and …

---

## [Using Angstrom with Eio?](https://discuss.ocaml.org/t/using-angstrom-with-eio/15242)

<div class="topic-metadata">

**Author:** [@enetsee](https://discuss.ocaml.org/u/enetsee)\
**Replies:** 4\
**Last updated:** [September 5, 2024, 11:27am UTC](https://discuss.ocaml.org/t/using-angstrom-with-eio/15242 "2024-09-05T11:27:36Z")

</div>

In the Eio.Buf\_read docs it says: This module provides fairly efficient non-backtracking parsers. It is modelled on Angstrom’s API, and you should use that if backtracking is needed. I have in hand a Cohttp.Body.t wh…

---

## [How to avoid passing arguments with quotation marks in Eio.Process.run?](https://discuss.ocaml.org/t/how-to-avoid-passing-arguments-with-quotation-marks-in-eio-process-run/15227)

<div class="topic-metadata">

**Author:** [@leonardolima](https://discuss.ocaml.org/u/leonardolima)\
**Replies:** 3\
**Last updated:** [September 2, 2024, 4:19pm UTC](https://discuss.ocaml.org/t/how-to-avoid-passing-arguments-with-quotation-marks-in-eio-process-run/15227 "2024-09-02T16:19:10Z")

</div>

Hi. I’m trying to use Eio on Linux. The following Eio.Process.run proc\_mgr \["path/to/main.exe"; "-arg1 value1"; "-arg2 value2"\]; yields path/to/main.exe: unknown option '-arg1 value1'. Uncaught exception: Eio.Io…

---

## [How do I concurrently run a cohttp-server and my custom REPL?](https://discuss.ocaml.org/t/how-do-i-concurrently-run-a-cohttp-server-and-my-custom-repl/15157)

<div class="topic-metadata">

**Author:** [@kentookura](https://discuss.ocaml.org/u/kentookura)\
**Replies:** 3\
**Last updated:** [August 21, 2024, 4:52pm UTC](https://discuss.ocaml.org/t/how-do-i-concurrently-run-a-cohttp-server-and-my-custom-repl/15157 "2024-08-21T16:52:40Z")

</div>

Hi all, I am trying to add a cohttp server to my application and am having trouble setting it up. The reproduction below is adapted from the official example. The issue is that the server does not start properly: the br…

---

## [Cohttp\_eio + eio-ssl?](https://discuss.ocaml.org/t/cohttp-eio-eio-ssl/15132)

<div class="topic-metadata">

**Author:** [@dx3mod](https://discuss.ocaml.org/u/dx3mod)\
**Replies:** 2\
**Last updated:** [August 15, 2024, 7:15pm UTC](https://discuss.ocaml.org/t/cohttp-eio-eio-ssl/15132 "2024-08-15T19:15:22Z")

</div>

Hello everyone :wave: Is it possible to use cohttp-eio with eio-ssl? And are there any advantages over using ocaml-tls? Because with cohttp-lwt-unix, https support works out of the box and there is a choice between ocam…

---

## [Effects with Lwt, a dead end for now?](https://discuss.ocaml.org/t/effects-with-lwt-a-dead-end-for-now/15002)

<div class="topic-metadata">

**Author:** [@kentookura](https://discuss.ocaml.org/u/kentookura)\
**Replies:** 7\
**Last updated:** [July 24, 2024, 7:21pm UTC](https://discuss.ocaml.org/t/effects-with-lwt-a-dead-end-for-now/15002 "2024-07-24T19:21:15Z")

</div>

This thread is basically a discussion about this issue: I am trying to integrate irmin into an application that makes heavy use of effects, in particular Algaeff, Asai and Eio. Now, irmin uses lwt and while there is a…

---

## [How to prevent a closure that passed to a C function as a callback from being garbage collected prematurely?](https://discuss.ocaml.org/t/how-to-prevent-a-closure-that-passed-to-a-c-function-as-a-callback-from-being-garbage-collected-prematurely/14901)

<div class="topic-metadata">

**Author:** [@ben131](https://discuss.ocaml.org/u/ben131)\
**Replies:** 8\
**Last updated:** [July 4, 2024, 3:56pm UTC](https://discuss.ocaml.org/t/how-to-prevent-a-closure-that-passed-to-a-c-function-as-a-callback-from-being-garbage-collected-prematurely/14901 "2024-07-04T15:56:23Z")

</div>

I need to call an async C function that returns a future type(something like a promise type in Lwt or Eio). There is a future\_set\_callback function on the C side, and it receives a function pointer and will call this fun…

---

## [How to write an efficient 'cp -R' clone with Eio?](https://discuss.ocaml.org/t/how-to-write-an-efficient-cp-r-clone-with-eio/14848)

<div class="topic-metadata">

**Author:** [@kentookura](https://discuss.ocaml.org/u/kentookura)\
**Replies:** 9\
**Last updated:** [July 2, 2024, 2:01pm UTC](https://discuss.ocaml.org/t/how-to-write-an-efficient-cp-r-clone-with-eio/14848 "2024-07-02T14:01:00Z")

</div>

In order to make the program I am working on portable to windows, I need to replace this function: let copy\_to\_dir ~env ~cwd ~source ~dest\_dir = run\_process ~quiet:true ~env ~cwd \["cp"; "-R"; source; dest\_dir ^ "/" \] …

[Next page](https://discuss.ocaml.org/tag/eio/577.md?match_all_tags=true&page=1&tags%5B%5D=eio)
