@@ -1007,37 +1007,21 @@ returned from `spawn_datadeps`.
10071007"""
10081008function spawn_datadeps (f:: Base.Callable ; static:: Bool = true ,
10091009 scheduler= nothing ,
1010- aliasing:: Bool = true ,
1011- launch_wait:: Union{Bool,Nothing} = nothing )
1010+ aliasing:: Bool = true )
10121011 if ! static
10131012 throw (ArgumentError (" Dynamic scheduling is no longer available" ))
10141013 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)
10371022 end
1038- return result
10391023 end
1024+ return result
10401025end
10411026const DATADEPS_SCHEDULER = ScopedValue {Any} (nothing )
10421027const DATADEPS_SCHEDULE_REUSABLE = ScopedValue {Bool} (true )
1043- const DATADEPS_LAUNCH_WAIT = ScopedValue {Union{Bool,Nothing}} (nothing )
0 commit comments