Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to read which backend was picked by libev. #985

Merged
merged 5 commits into from
Nov 8, 2024

Conversation

mefyl
Copy link
Contributor

@mefyl mefyl commented Mar 20, 2023

My use case for this is letting libev choose its backend freely, but checking it did not fallback to select in production as the 1024 file descriptor limit is not fit for purpose.

@mefyl
Copy link
Contributor Author

mefyl commented Mar 20, 2023

I'm at a loss as to why this fails in ocaml-ci with undefined reference to 'lwt_libev_backend' on all platforms; it absolutely works locally for me and the function is present in the C stub file 🤔

@raphael-proust
Copy link
Collaborator

This seems like a reasonable addition. I'll look into the failure.

@raphael-proust
Copy link
Collaborator

I started the other CI tests (I just noticed they needed an approval start) and they paint a much clearer picture: the error occurs when the code is compiled with libev deactivated.

I've pushed a commit adding some lazy because I believe the error occurs as a result of initialisation when libev is absent.

@raphael-proust
Copy link
Collaborator

It doesn't work, same error. I'll dig further.

Copy link

@bnguyenvanyen bnguyenvanyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, we're still interested in having this upstream.
I don't know how to reproduce the CI failure, but I made a suggestion for the fix in the code: Use the LWT_NOT_AVAILABLE1 macro when libev is not available, similarly to the other functions in the module.

src/unix/lwt_libev_stubs.c Show resolved Hide resolved
@mefyl
Copy link
Contributor Author

mefyl commented Oct 3, 2024

The remaining CI issues seem to be the same as master AFAICS.

@raphael-proust
Copy link
Collaborator

Thanks!
I'm hoping to do a 5.8.1 release soon and I'll include this. (Sorry I only noticed your changes after pushing the 5.8.0 through.

@raphael-proust
Copy link
Collaborator

Thanks a lot for the contribution <3

@raphael-proust raphael-proust merged commit 5b59c71 into ocsigen:master Nov 8, 2024
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants