-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Expected Behavior
Unless I'm missing something, read_mode_threshold enables synchronously sending files smaller than the set threshold:
https://github.com/actix/actix-web/blob/main/actix-files/src/chunked.rs#L80-L84
Current Behavior
However, the docs for actix_files::Files::read_mode_threshold and actix_files::NamedFile::read_mode_threshold state:
When a file is smaller than the threshold (bytes), the reader will switch from synchronous (blocking) file-reads to async reads to avoid blocking the main-thread when processing large files.
Possible Solution
It looks like the corresponding statements in the docs need to be inverted.
Steps to Reproduce (for bugs)
N/A.
Context
Noticed this while cargo vet-ing actix-files 0.6.8. Then checked both 0.6.9 and the main branch.
Your Environment
- Rust Version (I.e, output of
rustc -V): N/A - Actix Web Version: N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels