@@ -1007,37 +1007,21 @@ returned from `spawn_datadeps`.
1007
1007
"""
1008
1008
function spawn_datadeps (f:: Base.Callable ; static:: Bool = true ,
1009
1009
scheduler= nothing ,
1010
- aliasing:: Bool = true ,
1011
- launch_wait:: Union{Bool,Nothing} = nothing )
1010
+ aliasing:: Bool = true )
1012
1011
if ! static
1013
1012
throw (ArgumentError (" Dynamic scheduling is no longer available" ))
1014
1013
end
1015
- wait_all (; check_errors= true ) do
1016
- scheduler = something (scheduler, DATADEPS_SCHEDULER[], RoundRobinScheduler ())
1017
- launch_wait = something (launch_wait, DATADEPS_LAUNCH_WAIT[], false ):: Bool
1018
- local result
1019
- if launch_wait
1020
- spawn_bulk () do
1021
- queue = DataDepsTaskQueue (get_options (:task_queue );
1022
- scheduler, aliasing)
1023
- result = with_options (f; task_queue= queue)
1024
- while ! isempty (queue. seen_tasks)
1025
- @dagdebug nothing :spawn_datadeps " Entering Datadeps region"
1026
- distribute_tasks! (queue)
1027
- end
1028
- end
1029
- else
1030
- queue = DataDepsTaskQueue (get_options (:task_queue );
1031
- scheduler, aliasing)
1032
- result = with_options (f; task_queue= queue)
1033
- while ! isempty (queue. seen_tasks)
1034
- @dagdebug nothing :spawn_datadeps " Entering Datadeps region"
1035
- distribute_tasks! (queue)
1036
- end
1014
+ scheduler = something (scheduler, DATADEPS_SCHEDULER[], RoundRobinScheduler ())
1015
+ queue = DataDepsTaskQueue (get_options (:task_queue , DefaultTaskQueue ());
1016
+ scheduler, aliasing)
1017
+ result = with_options (f; task_queue= queue)
1018
+ while ! isempty (queue. seen_tasks)
1019
+ wait_all (; check_errors= true ) do
1020
+ @dagdebug nothing :spawn_datadeps " Entering Datadeps region"
1021
+ distribute_tasks! (queue)
1037
1022
end
1038
- return result
1039
1023
end
1024
+ return result
1040
1025
end
1041
1026
const DATADEPS_SCHEDULER = ScopedValue {Any} (nothing )
1042
1027
const DATADEPS_SCHEDULE_REUSABLE = ScopedValue {Bool} (true )
1043
- const DATADEPS_LAUNCH_WAIT = ScopedValue {Union{Bool,Nothing}} (nothing )
0 commit comments