bevy/crates/bevy_tasks/src
James Liu 53a5bbe2d5 Add thread create/destroy callbacks to TaskPool (#6561)
# Objective
Fix #1991. Allow users to have a bit more control over the creation and finalization of the threads in `TaskPool`.

## Solution
Add new methods to `TaskPoolBuilder` that expose callbacks that are called to initialize and finalize each thread in the `TaskPool`.

Unlike the proposed solution in #1991, the callback is argument-less. If an an identifier is needed, `std:🧵:current` should provide that information easily.

Added a unit test to ensure that they're being called correctly.
2022-12-20 16:17:02 +00:00
..
iter small and mostly pointless refactoring (#2934) 2022-02-13 22:33:55 +00:00
lib.rs Revert "Show prelude re-exports in docs (#6448)" (#6449) 2022-11-02 20:40:45 +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 Add thread create/destroy callbacks to TaskPool (#6561) 2022-12-20 16:17:02 +00:00
task.rs Add is_finished to Task<T> (#6444) 2022-11-02 12:27:22 +00:00
usages.rs tick local executor (#6121) 2022-10-24 13:46:40 +00:00