Skip to content
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

io module #342

Closed
wants to merge 2 commits into from
Closed

io module #342

wants to merge 2 commits into from

Conversation

oconnor663
Copy link
Member

This is a proposed blake::io API based on @Banyc's work in #326. We should definitely bikeshed it a bit before we land anything.

@Banyc
Copy link
Contributor

Banyc commented Sep 11, 2023

LGTM and I have learned a lot!

@oconnor663 oconnor663 force-pushed the io_module branch 3 times, most recently from 75e0913 to aefd5dc Compare September 16, 2023 23:17
New methods:
- update_reader
- update_mmap
- update_mmap_rayon

These are more discoverable and more convenient to use.

There are two problems I want to avoid by taking a `Path` instead of a
`File`. First, exposing `Mmap` objects to the caller is fundamentally
unsafe, and making `maybe_mmap_file` private avoids that issue. Second,
taking a `File` raises questions about whether memory mapped reads
should behave like regular file reads. (Should they respect the current
seek position? Should they update the seek position?) Taking a `Path`
from the caller and opening the `File` internally avoids these
questions.
@oconnor663
Copy link
Member Author

cb32f0b

@oconnor663 oconnor663 closed this Sep 17, 2023
@oconnor663 oconnor663 deleted the io_module branch September 17, 2023 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants