We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4a43ea commit ce22ca3Copy full SHA for ce22ca3
crates/bevy_tasks/src/single_threaded_task_pool.rs
@@ -80,8 +80,8 @@ pub struct TaskPool {}
80
81
impl TaskPool {
82
/// Just create a new `ThreadExecutor` for wasm
83
- pub fn get_thread_executor() -> Arc<ThreadSpawner<'static>> {
84
- Arc::new(ThreadSpawner::new())
+ pub fn current_thread_spawner(&self) -> ThreadSpawner<'static> {
+ ThreadSpawner::new()
85
}
86
87
/// Create a `TaskPool` with the default configuration.
@@ -119,7 +119,7 @@ impl TaskPool {
119
#[expect(unsafe_code, reason = "Required to transmute lifetimes.")]
120
pub fn scope_with_executor<'env, F, T>(
121
&self,
122
- _thread_executor: Option<&ThreadSpawner>,
+ _thread_executor: Option<ThreadSpawner>,
123
f: F,
124
) -> Vec<T>
125
where
0 commit comments