Commit 5351ea0
authored
Make the web_asset_cache compile in single-threaded mode. (#23994)
# Objective
- `cargo t -p bevy_asset --features=http,https,web_asset_cache` fails to
compile.
- This is because we don't want to use `async_fs::File` in
single-threaded since that uses a blocking IO thread to read files. We
instead just do the blocking on the async thread since we're
single-threaded any way.
## Solution
- Use the `FileReader` from our sync_file_asset module if
`multi_threaded` is not enabled.
## Testing
- The tests pass without `multi_threaded` enabled.1 parent 1dac2ec commit 5351ea0
3 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
246 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
247 | 251 | | |
248 | 252 | | |
249 | 253 | | |
| |||
0 commit comments