# \#concurrency

**URL:** https://discourse.julialang.org/tag/concurrency/506.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [One thread concurrency: realized in REPL, but failed in a function](https://discourse.julialang.org/t/one-thread-concurrency-realized-in-repl-but-failed-in-a-function/131621)

<div class="topic-metadata">

**Author:** [@WalterMadelim](https://discourse.julialang.org/u/WalterMadelim)\
**Replies:** 17\
**Last updated:** [August 20, 2025, 12:20pm UTC](https://discourse.julialang.org/t/one-thread-concurrency-realized-in-repl-but-failed-in-a-function/131621 "2025-08-20T12:20:35Z")

</div>

I did a test on the concurrency using @spawn, and find what the title suggests. I don’t know where is the twist. Here are my code import Base.Threads.@spawn Threads.nthreads() # use only one thread in this test s(x) = …

---

## [Concurrent Downloads.curl usage results in Error: curl\_multi\_socket\_action: 8](https://discourse.julialang.org/t/concurrent-downloads-curl-usage-results-in-error-curl-multi-socket-action-8/129860)

<div class="topic-metadata">

**Author:** [@csvance](https://discourse.julialang.org/u/csvance)\
**Replies:** 0\
**Last updated:** [June 13, 2025, 12:54pm UTC](https://discourse.julialang.org/t/concurrent-downloads-curl-usage-results-in-error-curl-multi-socket-action-8/129860 "2025-06-13T12:54:33Z")

</div>

Hi everyone, new to Julia and looking to integrate it into a SaMD as an alternative to Numba for performance critical sections of the code. As part of the performance critical sections, I’m trying to to use gRPC to call…

---

## [Is it possible to force a task to have a particular thread id?](https://discourse.julialang.org/t/is-it-possible-to-force-a-task-to-have-a-particular-thread-id/129172)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 4\
**Last updated:** [May 21, 2025, 3:08pm UTC](https://discourse.julialang.org/t/is-it-possible-to-force-a-task-to-have-a-particular-thread-id/129172 "2025-05-21T15:08:37Z")

</div>

I’m trying to make a GUI in QML.jl that does a lot of things asynchronously. In order to improve performance I would like to run Julia with multiple threads since everything is organized into tasks anyway. But QML.jl do…

---

## [Lock free sorted linked list](https://discourse.julialang.org/t/lock-free-sorted-linked-list/115157)

<div class="topic-metadata">

**Author:** [@melevy](https://discourse.julialang.org/u/melevy)\
**Replies:** 18\
**Last updated:** [June 6, 2024, 7:29pm UTC](https://discourse.julialang.org/t/lock-free-sorted-linked-list/115157 "2024-06-06T19:29:10Z")

</div>

Hi! I’m trying to implement a lock free sorted linked list as shown in 9.8 Nonblocking synchronization of the book titled The art of multiprocessor programming. I need something like AtomicMarkableReference or maybe…

---

## [Add Tasks to Background Worker](https://discourse.julialang.org/t/add-tasks-to-background-worker/114595)

<div class="topic-metadata">

**Author:** [@stefanjwojcik](https://discourse.julialang.org/u/stefanjwojcik)\
**Replies:** 3\
**Last updated:** [May 23, 2024, 11:48am UTC](https://discourse.julialang.org/t/add-tasks-to-background-worker/114595 "2024-05-23T11:48:17Z")

</div>

I’m trying to create a worker who will pick up tasks from a global list and execute them without blocking the repl (i.e. the worker executes in the background). In the following MWE, I’d expect that adding tasks to the w…

---

## [Hazard pointers - in C++26 vs Julia - concurrency/atomics e.g. for UInt128](https://discourse.julialang.org/t/hazard-pointers-in-c-26-vs-julia-concurrency-atomics-e-g-for-uint128/108866)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 4\
**Last updated:** [January 24, 2024, 5:30am UTC](https://discourse.julialang.org/t/hazard-pointers-in-c-26-vs-julia-concurrency-atomics-e-g-for-uint128/108866 "2024-01-24T05:30:00Z")

</div>

I hadn’t seen this concept, and wanted to let others know, and ask how it contrasts to Julia, but to answer my own question: In a multithreaded computing environment, hazard pointers are one approach to solving the pr…

---

## [Interrupting wait(Threads.Event())](https://discourse.julialang.org/t/interrupting-wait-threads-event/105047)

<div class="topic-metadata">

**Author:** [@ettersi](https://discourse.julialang.org/u/ettersi)\
**Replies:** 14\
**Last updated:** [November 8, 2023, 6:41am UTC](https://discourse.julialang.org/t/interrupting-wait-threads-event/105047 "2023-11-08T06:41:18Z")

</div>

I want to wait for a Threads.Event() for at most 1 second, then I want to move on regardless of whether the event was notified or not. The following works, but it leaks a Task and a dummy event every time I do this. eve…

---

## [Can the CPU function be a multi-process parallel function when using the Threads.@spawn command to perform overlapping operations between the GPU and the CPU?](https://discourse.julialang.org/t/can-the-cpu-function-be-a-multi-process-parallel-function-when-using-the-threads-spawn-command-to-perform-overlapping-operations-between-the-gpu-and-the-cpu/103098)

<div class="topic-metadata">

**Author:** [@fred\_wu](https://discourse.julialang.org/u/fred_wu)\
**Replies:** 3\
**Last updated:** [August 24, 2023, 7:45am UTC](https://discourse.julialang.org/t/can-the-cpu-function-be-a-multi-process-parallel-function-when-using-the-threads-spawn-command-to-perform-overlapping-operations-between-the-gpu-and-the-cpu/103098 "2023-08-24T07:45:01Z")

</div>

Hi, When the CPU performs compute-intensive tasks, it never yields, so the Threads.@spawn command assigns CPU and GPU operations to different threads to achieve overlap and shorten the overall running time. However, can…

---

## [Task/thread-local caches/buffers](https://discourse.julialang.org/t/task-thread-local-caches-buffers/101309)

<div class="topic-metadata">

**Author:** [@ranocha](https://discourse.julialang.org/u/ranocha)\
**Replies:** 12\
**Last updated:** [July 9, 2023, 10:56am UTC](https://discourse.julialang.org/t/task-thread-local-caches-buffers/101309 "2023-07-09T10:56:05Z")

</div>

What is currently the best way to handle task/thread-local caches/buffers that need to be accessed efficiently from functions called from a Threads.@threads for loop? The background is as follows. As described in the re…

---

## [Thread Safe Data Structures](https://discourse.julialang.org/t/thread-safe-data-structures/91483)

<div class="topic-metadata">

**Author:** [@Immortalin](https://discourse.julialang.org/u/Immortalin)\
**Replies:** 2\
**Last updated:** [March 9, 2023, 9:11am UTC](https://discourse.julialang.org/t/thread-safe-data-structures/91483 "2023-03-09T09:11:04Z")

</div>

Julia Collections’ Thread Safe data structures is marked as deprecated. What options do we currently have for thread safe structures? Rust for example, has Crossbeam

---

## [Learning (a)synchronous parallelization on a simple graph problem](https://discourse.julialang.org/t/learning-a-synchronous-parallelization-on-a-simple-graph-problem/92670)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 8\
**Last updated:** [March 5, 2023, 2:09am UTC](https://discourse.julialang.org/t/learning-a-synchronous-parallelization-on-a-simple-graph-problem/92670 "2023-03-05T02:09:58Z")

</div>

I’m starting to learn about concurrent / parallel / distributed computing on a simple graph problem and would really appreciate any help. I am trying to squeeze every drop of performance out of Julia, so comments on how …

---

## [CUDA.jl - Multiple Threads to Initiate Same CUDA Algorithm](https://discourse.julialang.org/t/cuda-jl-multiple-threads-to-initiate-same-cuda-algorithm/79728)

<div class="topic-metadata">

**Author:** [@moukann](https://discourse.julialang.org/u/moukann)\
**Replies:** 3\
**Last updated:** [April 26, 2022, 7:58am UTC](https://discourse.julialang.org/t/cuda-jl-multiple-threads-to-initiate-same-cuda-algorithm/79728 "2022-04-26T07:58:04Z")

</div>

Hello all, Let’s say we have a situation where we run a for loop with “n” times. Every for loop contains CUDA kernels and CPU functions mixture. However, every operation is independent from each other. for index = 1:n …

---

## [Channel with sliding window buffer?](https://discourse.julialang.org/t/channel-with-sliding-window-buffer/68647)

<div class="topic-metadata">

**Author:** [@vshesh](https://discourse.julialang.org/u/vshesh)\
**Replies:** 0\
**Last updated:** [September 23, 2021, 8:16pm UTC](https://discourse.julialang.org/t/channel-with-sliding-window-buffer/68647 "2021-09-23T20:16:42Z")

</div>

Are there any versions of julia channels that do not block when they are full? I’m looking for a channel that will do a sliding window (so drop the front of the queue when adding something to the back if it’s full). Doe…

---

## [Tutorial: Concurrency patterns for controlled parallelisms](https://discourse.julialang.org/t/tutorial-concurrency-patterns-for-controlled-parallelisms/62651)

<div class="topic-metadata">

**Author:** [@tkf](https://discourse.julialang.org/u/tkf)\
**Replies:** 4\
**Last updated:** [June 20, 2021, 8:23pm UTC](https://discourse.julialang.org/t/tutorial-concurrency-patterns-for-controlled-parallelisms/62651 "2021-06-20T20:23:52Z")

</div>

Hi, I just wrote a quick tutorial on a couple of patterns using Channel that are handy for some parallel processing: Concurrency patterns for controlled parallelisms. High-level data parallelism is the best starting po…

---

## [\[ANN\] Actors 0.2, GenServers and Guards](https://discourse.julialang.org/t/ann-actors-0-2-genservers-and-guards/52056)

<div class="topic-metadata">

**Author:** [@pbayer](https://discourse.julialang.org/u/pbayer)\
**Replies:** 13\
**Last updated:** [January 30, 2021, 3:52pm UTC](https://discourse.julialang.org/t/ann-actors-0-2-genservers-and-guards/52056 "2021-01-30T15:52:08Z")

</div>

I’m happy to announce the release of Actors 0.2 together with two actor infrastructure libraries GenServers and Guards. Actors: Concurrency based on the Actor Model Actors implements the classical Actor model in Julia. …

---

## [JuliaActors: a road to an Actors ecosystem](https://discourse.julialang.org/t/juliaactors-a-road-to-an-actors-ecosystem/49898)

<div class="topic-metadata">

**Author:** [@pbayer](https://discourse.julialang.org/u/pbayer)\
**Replies:** 17\
**Last updated:** [December 6, 2020, 1:38pm UTC](https://discourse.julialang.org/t/juliaactors-a-road-to-an-actors-ecosystem/49898 "2020-12-06T13:38:25Z")

</div>

Following the discussion in another thread now we have JuliaActors, a yet small Julia GitHub group of enthusiasts dedicated to build an actors ecosystem in Julia. Since this is not anymore a discussion about one library,…

---

## [\[ANN\] YAActL 0.2, Yet Another Actor Library (built in Julia)](https://discourse.julialang.org/t/ann-yaactl-0-2-yet-another-actor-library-built-in-julia/48637)

<div class="topic-metadata">

**Author:** [@pbayer](https://discourse.julialang.org/u/pbayer)\
**Replies:** 43\
**Last updated:** [November 11, 2020, 10:43pm UTC](https://discourse.julialang.org/t/ann-yaactl-0-2-yet-another-actor-library-built-in-julia/48637 "2020-11-11T22:43:35Z")

</div>

I am happy to announce YAActL, a new actor library for concurrent programming in Julia. An Actor is a computational entity that, in response to a message it receives, can concurrently: send a finite number of message…
