-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Using File.read with async in Windows causes Bad file descriptor
Exception
#206
Comments
I guess it's a limitation of Windows. The best thing we can do is try to avoid doing any kind of asynchronous file IO, which isn't supported anyway in this situation. The simple solution is to just detect windows and skip any kind of asynchronous |
Then I'll just try detecting Windows and avoid async file IO on it... Thank you for your comment and advice. |
Async on Windows is a work in progress. The first part was to get |
#184 now includes the above. |
Description
When I use File.read in Async, the following exception is thrown.
This behavior is only observed in Windows with ruby 3.1.
Also, I reproduced this behavior in GitHub Actions here.
Sample Code
Expected Behavior
No exception is thrown, and the content of
README.md
is shown on console.Actual Behavior
Errno::EBADF: Bad file descriptor
exception is thrown, and the task stops there.Versions
Windows 10 Home 21H2
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x64-mingw-ucrt]
async (2.3.0)
The text was updated successfully, but these errors were encountered: