ocaml-multicore / picos

Interoperable effects based concurrency
https://ocaml-multicore.github.io/picos/doc/picos/index.html
ISC License
86 stars 3 forks source link

Attempt to work around `Unix.socketpair` issue on Win32 #269

Closed polytypic closed 1 month ago

polytypic commented 1 month ago

Unix.socketpair occasionally fails on Windows:

--- a/_build/default/lib/picos_io/picos_io.mli
+++ b/_build/default/lib/picos_io/.mdx/picos_io.mli.corrected
@@ -753,7 +753,5 @@ end
           send_string "Hello, world!";
           send_string "POSIX with OCaml";
         end
-      Hello, world!
-      POSIX with OCaml
-      - : unit = ()
+      Exception: Unix.Unix_error(Unix.EADDRINUSE, "socketpair", "")
     ]} *)

This introduces a workaround to retry Unix.socketpair a few times to avoid random CI failures #259.