Skip to content

Commit 197922a

Browse files
committed
don't export 3-arg Task constructor
1 parent 91b8ee4 commit 197922a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

base/boot.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ eval(Core, :(LineInfoNode(mod::Module, method::Symbol, file::Symbol, line::Int,
380380

381381
Module(name::Symbol=:anonymous, std_imports::Bool=true) = ccall(:jl_f_new_module, Ref{Module}, (Any, Bool), name, std_imports)
382382

383-
function Task(@nospecialize(f), reserved_stack::Int, completion_future)
383+
function _Task(@nospecialize(f), reserved_stack::Int, completion_future)
384384
return ccall(:jl_new_task, Ref{Task}, (Any, Any, Int), f, completion_future, reserved_stack)
385385
end
386386

base/task.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## basic task functions and TLS
44

55
const ThreadSynchronizer = GenericCondition{Threads.SpinLock}
6-
Core.Task(@nospecialize(f), reserved_stack::Int=0) = Task(f, reserved_stack, ThreadSynchronizer())
6+
Core.Task(@nospecialize(f), reserved_stack::Int=0) = Core._Task(f, reserved_stack, ThreadSynchronizer())
77

88
# Container for a captured exception and its backtrace. Can be serialized.
99
struct CapturedException <: Exception

0 commit comments

Comments
 (0)