Utility

Warning

This section isn't part of the official API. Things might change at any point without further notice.

Index

References

ThreadPinning.interweaveMethod
interweave(arrays::AbstractVector...) -> Any

Examples

interweave([1,2,3,4], [5,6,7,8]) == [1,5,2,6,3,7,4,8]
interweave(1:4, 5:8, 9:12) == [1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12]
source
ThreadPinning.@tspawnatMacro
@tspawnat tid -> task

Mimics Threads.@spawn, but assigns the task to thread tid (with sticky = true).

Note for Julia >= 1.9: Threads in the :interactive thread pool come after those in :default. Hence, use a thread id tid > nthreads(:default) to spawn computations on "interactive" threads.

Example

julia> t = @tspawnat 4 Threads.threadid()
Task (runnable) @0x0000000010743c70
julia> fetch(t)
4
source