You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be useful to have a little File module to read/write files in a scheduler-friendly way.
In short, we would need a module likeNet.Socket with functions like:
File.open file that returns a Fd.t
File.read fil that return an (Bigstringaf.t, _) result
File.write file ~data
Internally these functions can call the I/O module to do the actual reading/writing, they just have to beware that if the I/O module says `Retry then you have to call syscall "debugging-name" fd @@ fun fd -> (* do work here *) like this:
Would be useful to have a little File module to read/write files in a scheduler-friendly way.
In short, we would need a module like
Net.Socket
with functions like:File.open file
that returns aFd.t
File.read fil
that return an(Bigstringaf.t, _) result
File.write file ~data
Internally these functions can call the I/O module to do the actual reading/writing, they just have to beware that if the I/O module says
`Retry
then you have to callsyscall "debugging-name" fd @@ fun fd -> (* do work here *)
like this:This way we would tell the scheduler we're waiting, and some other process can run.
The text was updated successfully, but these errors were encountered: