Move Eio.Stdenv.t to Eio_unix.Stdenv.base#498
Merged
talex5 merged 1 commit intoocaml-multicore:mainfrom May 2, 2023
Merged
Conversation
The old type wasn't directly useful for anything, since nothing provides exactly this set of resources, and nothing needs to consume exactly this set either. However, it is useful in Eio_unix as the set of resources that a backend needs to provide to be compatible with `Eio_main.run`. The new type is almost the same for now, except that the standard streams include file descriptors. Other Unix-specific features can be added later, such as support for passing file descriptors over sockets or to child processes.
Contributor
|
if I want to ask for "classic" permissions that a non-Eio program would have, what should I use now? I started something with 0.9 and exactly one |
Collaborator
Author
|
If your program requires a "classic" OS then you can just use But probably it would be better to list the things your program actually needs. See: https://github.com/ocaml-multicore/eio#passing-env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The old type wasn't directly useful for anything, since nothing provides exactly this set of resources, and nothing needs to consume exactly this set either. However, it is useful in Eio_unix as the set of resources that a backend needs to provide to be compatible with
Eio_main.run.The new type is almost the same for now, except that the standard streams include file descriptors. Other Unix-specific features can be added later, such as support for passing file descriptors over sockets or to child processes.
I called the type
basebecause we might want to add aStdenv.linux_or_unixsubtype later for basically everything that isn't Windows. Not sure what the name should be, though.Note that, due to the way row-polymorphism works in OCaml, we can't e.g. have
Net.connectreturn anEio_unix.socketsubtype ofEio.Net.socket. But we can add a new function (e.g.connect_unix) that returns a richer socket type.