Documentation request: Why do Task names get reallocated into a Box<str> ?
Open
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 339
- PR merge metrics
- No merged PRs in 30d
Description
When a String is provided as a Task name, it always gets reallocated (AFAICT) in this line of code:
https://github.com/async-rs/async-std/blob/master/src/task/task.rs#L33
```
name: name.map(String::into_boxed_str),
```
For my use case, this forces Task names to be unusable because that causes a lot of heap churn. If there's a good reason for this allocation, then I recommend documenting it. Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.