async-rs / async-rs/async-std

How to read a file concurrently?

Open
#646 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.1k
Forks
339
PR merge metrics
No merged PRs in 30d

Description

I want to sending a large file to another host over network, for making it speed up, I would create multiple threads, every thread sending one part of the file. so multiple threads will reading the same file concurrently. there are two solutions:
1. share the async_std::fs::File between threads.
2. open the same file in every thread.
which is the conventional and fast way?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.