Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Tasks are still running on main thread

Open
#4 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
rust, wasm
Domain
web-dev

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bevyengine/web-task

All issues in bevyengine/web-task

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.