sled icon indicating copy to clipboard operation
sled copied to clipboard

implement actual parallel IO trait for windows

Open spacejam opened this issue 7 years ago • 3 comments

We need to support parallel writes for building on windows.

I believe the way to go about this is through https://retep998.github.io/doc/kernel32/fn.WriteFile.html and passing in an OVERLAPPED struct, as per SO.

Here's the current, global-lock driven approach on windows, which may not even compile: https://github.com/spacejam/sled/pull/242/commits/2906673fe6755f18bebf5d90a63eca6ff75a2036#diff-f23996d5649981fd238dd760793391c1R78

spacejam avatar Feb 11 '18 02:02 spacejam

Hello! I'd like to give this issue a try. The link https://retep998.github.io/doc/kernel32/fn.WriteFile.html is broken. Can you provide me a few more pointers as to where to start looking? Thanks.

govardhangdg avatar Mar 03 '20 12:03 govardhangdg

Hey @govardhangdg, here's a working link https://docs.rs/winapi/0.3.8/winapi/um/fileapi/fn.WriteFile.html

Let me know if you have any questions! I'm happy that you're taking a look at it :)

spacejam avatar Mar 04 '20 14:03 spacejam

Thanks @spacejam . There has been quite some refactoring since the issue was opened. I assume that the concerned files are parallel_io_polyfill.rs, parallel_io_unix.rs and parallel_io_windows.rs in the https://github.com/spacejam/sled/tree/master/src/pagecache directory. Are there any changes in the issue, considering the changes in code in the past two years? Also why just windows? Is there already such a trait for unix/linux, or is there no need for it for some reason? Thanks.

govardhangdg avatar Mar 05 '20 02:03 govardhangdg