@@ -58,8 +58,6 @@ struct SystemTaskMetadata {
58
58
archetype_component_access : Access < ArchetypeComponentId > ,
59
59
/// Indices of the systems that directly depend on the system.
60
60
dependents : Vec < usize > ,
61
- /// Is `true` if the system does not access `!Send` data.
62
- is_send : bool ,
63
61
/// Is `true` if the system is exclusive.
64
62
is_exclusive : bool ,
65
63
}
@@ -80,8 +78,6 @@ pub struct MultiThreadedExecutor {
80
78
system_task_metadata : Vec < SystemTaskMetadata > ,
81
79
/// Union of the accesses of all currently running systems.
82
80
active_access : Access < ArchetypeComponentId > ,
83
- /// Returns `true` if a system with non-`Send` access is running.
84
- local_thread_running : bool ,
85
81
/// Returns `true` if an exclusive system is running.
86
82
exclusive_running : bool ,
87
83
/// The number of systems expected to run.
@@ -151,7 +147,6 @@ impl SystemExecutor for MultiThreadedExecutor {
151
147
self . system_task_metadata . push ( SystemTaskMetadata {
152
148
archetype_component_access : default ( ) ,
153
149
dependents : schedule. system_dependents [ index] . clone ( ) ,
154
- is_send : schedule. systems [ index] . is_send ( ) ,
155
150
is_exclusive : schedule. systems [ index] . is_exclusive ( ) ,
156
151
} ) ;
157
152
}
@@ -270,7 +265,6 @@ impl MultiThreadedExecutor {
270
265
num_completed_systems : 0 ,
271
266
num_dependencies_remaining : Vec :: new ( ) ,
272
267
active_access : default ( ) ,
273
- local_thread_running : false ,
274
268
exclusive_running : false ,
275
269
evaluated_sets : FixedBitSet :: new ( ) ,
276
270
ready_systems : FixedBitSet :: new ( ) ,
@@ -370,10 +364,6 @@ impl MultiThreadedExecutor {
370
364
return false ;
371
365
}
372
366
373
- if !system_meta. is_send && self . local_thread_running {
374
- return false ;
375
- }
376
-
377
367
// TODO: an earlier out if world's archetypes did not change
378
368
for set_idx in conditions. sets_with_conditions_of_systems [ system_index]
379
369
. difference ( & self . evaluated_sets )
@@ -530,12 +520,7 @@ impl MultiThreadedExecutor {
530
520
self . active_access
531
521
. extend ( & system_meta. archetype_component_access ) ;
532
522
533
- if system_meta. is_send {
534
- scope. spawn ( task) ;
535
- } else {
536
- self . local_thread_running = true ;
537
- scope. spawn_on_external ( task) ;
538
- }
523
+ scope. spawn ( task) ;
539
524
}
540
525
541
526
/// # Safety
@@ -583,7 +568,7 @@ impl MultiThreadedExecutor {
583
568
584
569
#[ cfg( feature = "trace" ) ]
585
570
let task = task. instrument ( task_span) ;
586
- scope. spawn_on_scope ( task) ;
571
+ scope. spawn ( task) ;
587
572
} else {
588
573
let task = async move {
589
574
#[ cfg( feature = "trace" ) ]
@@ -613,11 +598,10 @@ impl MultiThreadedExecutor {
613
598
614
599
#[ cfg( feature = "trace" ) ]
615
600
let task = task. instrument ( task_span) ;
616
- scope. spawn_on_scope ( task) ;
601
+ scope. spawn ( task) ;
617
602
}
618
603
619
604
self . exclusive_running = true ;
620
- self . local_thread_running = true ;
621
605
}
622
606
623
607
fn finish_system_and_handle_dependents ( & mut self , result : SystemResult ) {
@@ -630,10 +614,6 @@ impl MultiThreadedExecutor {
630
614
self . exclusive_running = false ;
631
615
}
632
616
633
- if !self . system_task_metadata [ system_index] . is_send {
634
- self . local_thread_running = false ;
635
- }
636
-
637
617
debug_assert ! ( self . num_running_systems >= 1 ) ;
638
618
self . num_running_systems -= 1 ;
639
619
self . num_completed_systems += 1 ;
0 commit comments