Tasks are still running on main thread
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start by reproducing the reported wasm-web example with web_task::spawn and inspect whether the task executor creates or uses worker threads. Compare the reported thread name with the library's documented behavior; done when the cause is confirmed and the issue has either a clear fix or an explicit explanation of the threading limitation.
Written by the indexing model from the issue text.
Description
Hello, I tried creating computationally intensive tasks on wasm web, on separate threads using:
use std::thread;
use async_task::Task;
use bevy::tasks::futures::{check_ready, now_or_never};
use web_task::{spawn};
let task: Task<Option<NavigationPath>> = spawn(async move {
let current_thread = thread::current();
info!(
"Pathfinding is running on thread: name={:?}, id={:?}",
current_thread.name(),
current_thread.id()
);
let guard = obs_clone.read();
if let Ok(obstacles) = guard.as_ref() {
compute_path_towards(&*obstacles, pos, &target_clone, CELL_SIZE)
} else {
None
}
});
but it keeps printing "main" thread. I was thinking the purpose of this library is to specifically that right? Am I doing it wrong?
- Dominant language
- Rust
- Stars
- 11
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bevyengine/web-task
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bevyengine/web-task#5 ·
All issues in bevyengine/web-task
Similar issues
-
bug github_actions
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
registrystack/registry-stack#1393 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rocky-data/rocky#2181 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Openbot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
midnightntwrk/midnight-indexer#1557 ·