-
Notifications
You must be signed in to change notification settings - Fork 140
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
CSV.read leaves file open on Windows 7? #53
Comments
Hmmm.....I'm not sure we can do anything here; we're calling |
Thanks. That workaround works. CSV.read("data.txt")
if is_windows()
gc()
gc()
end Does not look nice though. If there is no handle of the file given to the user, I think the memory should be unmapped after reading. |
This works as well a=CSV.read("data.txt"; use_mmap=false) |
Maybe the same approach could be used in definition of
|
Here's the tradeoff: mmap is much faster, and this issue only comes up when you read a file and then quickly try to delete the underlying file. I could add some documentation around what needs to happen to safely delete, but it seems worth it to keep the speedups by using mmap by default on windows. |
I would find this additional documentation very useful (and maybe the conclusions could be also used in |
looks like to leave the file open in Windows 7. If I try to delete the file
data.txt
in Windows Explorer, I get the dialog "File In Use; The action can't be completed because the file is open in Julia Programming Language; Close the file and try again". If I close Julia, I can delete the file. However, I can delete the file in Git Bash without closing Julia.On Mac it seems to work fine.
Versions
The text was updated successfully, but these errors were encountered: