Skip to content

Latest commit

 

History

History
79 lines (63 loc) · 1.71 KB

File metadata and controls

79 lines (63 loc) · 1.71 KB

[Multi-Threading](@id lib-multithreading)

Base.Threads.@threads
Base.Threads.foreach
Base.Threads.@spawn
Base.Threads.threadid
Base.Threads.maxthreadid
Base.Threads.nthreads
Base.Threads.threadpool
Base.Threads.nthreadpools
Base.Threads.threadpoolsize
Base.Threads.ngcthreads

See also [Multi-Threading](@ref man-multithreading).

Atomic operations

atomic
Base.@atomic
Base.@atomicswap
Base.@atomicreplace
Base.@atomiconce
Base.AtomicMemory

There are also optional memory ordering parameters for the unsafe set of functions, that select the C/C++-compatible versions of these atomic operations, if that parameter is specified to unsafe_load, unsafe_store!, unsafe_swap!, unsafe_replace!, and unsafe_modify!.

!!! warning

The following APIs are deprecated, though support for them is likely to remain for several releases.
Base.Threads.Atomic
Base.Threads.atomic_cas!
Base.Threads.atomic_xchg!
Base.Threads.atomic_add!
Base.Threads.atomic_sub!
Base.Threads.atomic_and!
Base.Threads.atomic_nand!
Base.Threads.atomic_or!
Base.Threads.atomic_xor!
Base.Threads.atomic_max!
Base.Threads.atomic_min!
Base.Threads.atomic_fence
Base.Threads.atomic_fence_heavy
Base.Threads.atomic_fence_light

ccall using a libuv threadpool (Experimental)

Base.@threadcall

Low-level synchronization primitives

These building blocks are used to create the regular synchronization objects.

Base.Threads.AbstractSpinLock
Base.Threads.SpinLock
Base.Threads.PaddedSpinLock

Task metrics (Experimental)

Base.Experimental.task_metrics
Base.Experimental.task_running_time_ns
Base.Experimental.task_wall_time_ns