bevy/crates/bevy_tasks/src
Mike a13b6f8a05 Thread executor for running tasks on specific threads. (#7087)
# Objective

- Spawn tasks from other threads onto an async executor, but limit those tasks to run on a specific thread.
- This is a continuation of trying to break up some of the changes in pipelined rendering.
- Eventually this will be used to allow `NonSend` systems to run on the main thread in pipelined rendering #6503 and also to solve #6552.
- For this specific PR this allows for us to store a thread executor in a thread local, rather than recreating a scope executor for every scope which should save on a little work.

## Solution

- We create a Executor that does a runtime check for what thread it's on before creating a !Send ticker. The ticker is the only way for the executor to make progress.

---

## Changelog

- create a ThreadExecutor that can only be ticked on one thread.
2023-01-10 22:32:42 +00:00
..
iter small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
lib.rs Thread executor for running tasks on specific threads. (#7087) 2023-01-10 22:32:42 +00:00
single_threaded_task_pool.rs Nested spawns on scope (#4466) 2022-09-28 01:59:10 +00:00
slice.rs Document bevy_tasks and enable #![warn(missing_docs)] (#3509) 2022-01-16 04:53:22 +00:00
task_pool.rs Thread executor for running tasks on specific threads. (#7087) 2023-01-10 22:32:42 +00:00
task.rs Add is_finished to Task<T> (#6444) 2022-11-02 12:27:22 +00:00
thread_executor.rs Thread executor for running tasks on specific threads. (#7087) 2023-01-10 22:32:42 +00:00
usages.rs tick local executor (#6121) 2022-10-24 13:46:40 +00:00