lwt
lwt copied to clipboard
OCaml promises and concurrent I/O
Some CPU-bound Lwt programs call `Lwt.pause ()` a lot, in order to yield to any potential I/O that may be pending. However, doing this results in Lwt calling `select`/`kevent`/`epoll` at...
Running with the libev backend on Ubuntu 12.04 or 14.04 (in VirtualBox) leads to the test suite hanging on this test. Switching the libev back to use select makes the...
Lwt_unix.sleep seems not using CLOCK_MONOTONIC_RAW clock. This means that Lwt_unix.sleep can be affected by discontinuous jumps in the system time or NTP adjustment. Ie Lwt_unix.sleep 2.0 duration could be 3...
Found by @bluddy in https://github.com/inhabitedtype/httpaf/pull/54#issuecomment-398740281: > OK, I redid the test with the single yield () modification above. For the record, it involves turning line 1608 in `lwt_io.ml` to >...
I have a program using lwt that, at startup, perform a lot of Lwt_unix operations. Since they all happen in parallel and the default `pool_size` is 1000, hundredth of pthreads...
As a workaround to https://github.com/ocsigen/lwt/issues/569, I recently switched to using non-blocking fds. This worked on Linux and OSX but broke my Windows build. While I'm not sure the cause of...
The following program hangs on Windows : ``` let () = let open Lwt in Lwt_main.run begin Lwt_io.open_connection (Unix.ADDR_INET (Unix.inet_addr_of_string "127.0.0.1",46000)) >>= fun _ -> return () end ``` On...
[On Windows, `Lwt_unix.waitpid` just delegates to `Unix.waitpid`](https://github.com/ocsigen/lwt/blob/3.1.0/src/unix/lwt_unix.cppo.ml#L2197), even without the `Unix.WNOHANG` flag. That means the process will make a blocking system call and the whole Lwt event loop gets stuck....
If lwt_unix_launch_thread (https://github.com/ocsigen/lwt/blob/master/src/unix/lwt_unix_stubs.c#L195) fails to fork (for example when hitting the system-wide limit pid_max), one has that the thread_count has been incremented (https://github.com/ocsigen/lwt/blob/master/src/unix/lwt_unix_stubs.c#L1286) but never gets decremented. This causes a...
I had previously run into a bug with `Unix.select` on Windows, but I only just reported it: https://caml.inria.fr/mantis/view.php?id=7665 Long story short, when you have a fd set which is a...