Anton Bachin
Anton Bachin
Thanks for the link. I understand that this is a bug in OCaml's `Unix` library rather than Lwt, but, indeed, it would be nice if Lwt did the right thing...
> @aantron Do you know the historical reason why Lwt has an optional `base-unix` dependency rather than be made of two distinct packages? Do you know if this reason still...
You may also find `Lwt_unix.auto_yield` useful, with current Lwt: https://github.com/ocsigen/lwt/blob/336566dd63d7f948234a4f30919df329f25b0e3c/src/unix/lwt_unix.cppo.mli#L58-L65 This is indeed best solved inside the scheduler. The only reason for the libuv milestone is that until now, the...
Ok that's good :)
@Lupus, I guess another library solution to your case would be to add a variant of `yield` that yields only to other callbacks (CPU) and not I/O. But before adding...
See https://github.com/ocsigen/lwt/blob/9cbf3a9c21f181dcd78dabf2117f87a62a2d65cc/src/unix/lwt_main.mli#L45-L52 and https://discuss.ocaml.org/t/lwt-pause-versus-yield/7875.
They probably should be. This came up in a prior issue as well. I can't find it now. We chose not to address the problem at that point, but it's...
Part of the issue here is that we (well, I) failed to post the docs for Lwt 5.3.0. The docs for `Lwt_unix.fork` now say: https://github.com/ocsigen/lwt/blob/20466b8af1d04d07bf62e9d3092f323c5edd5339/src/unix/lwt_unix.cppo.mli#L182-L202 i.e. jobs are not canceled,...
`fork` doesn't abandon promises, it abandons the actual I/O *jobs*, i.e. the system threads and system calls that are being currently executed/monitored by Lwt. It then makes an effort to...
This may have been fixed by https://github.com/ocsigen/lwt/commit/86a6baff880f60faffccad49425478deb06c277b, part of #569, which isn't part of a release yet. The underlying problem was also spotted by @gabelevi, so thanks :)