-
Notifications
You must be signed in to change notification settings - Fork 7
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
Missing Unix bindings #42
Comments
After looking around a little more i may start to understand that syscalls non-associated with file descriptors may not be suitable to be part of If my understanding is correct, i would argue that having these functions in could still be useful even if they are defined the following way:
This way, even if those functions block a little bit, we're mostly assured that most jobs have been taken care of semi-recently. |
The issue is in fact more subtle than that and the choices made can lead to unwanted Miou behaviour. The idea of The same applies, for example, to file-descrs from What is certain here is that we are talking about a possible suspension due to the fact that the This is where there may be a notable difference. As far as files are concerned (which are also represented via a file-descr), we can be generally sure that However, even if reading or writing is not blocked, these operations can take a long time. So the issue isn't one of suspending and resuming, but of cooperation when there are several tasks reading/writing files running cooperatively - it should be noted that this cooperation problem no longer exists when these tasks are running in parallel! As a result:
More generally, it might be a good idea (and could be documented!) to use So, I would perhaps be more inclined to document all this properly in |
after reading this, i think having a job queue on another thread for IO purpose might be nice to have in miou. IO functions can take time (e.g. hardware is busy, network file systems like NFS, low priority program, …) and i feel like for most applications of Miou (e.g. web servers, …) such delay can quickly become a huge problem.
In any case, having some sort of documentation explaining all this in |
That's exactly the design I have in mind and it's probably (along with discussions with other people), the most interesting design. At this stage, we could improve
The documentation is available here: #43. If you have any comments or improvements. |
Thank you very much ❤️ for pinging me in this thread. I'm interested in this topic, I'm quite likely to use Miou for some personal projects, and I often receive questions regarding Lwt alternatives… |
While trying to use miou i encountered some roadblocks. These functions are missing from
Miou_unix
:opendir
closedir
readdir
openfile
mkdir
stat
unlink
rmdir
I feel like having these functions in
Miou_unix
would be highly valuable.The text was updated successfully, but these errors were encountered: