# \#threading

**URL:** https://discourse.julialang.org/tag/threading/1184.md

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

---

## [Julia -\> C (Pthread) -\> Julia Saxpy with Threads](https://discourse.julialang.org/t/julia-c-pthread-julia-saxpy-with-threads/118097)

<div class="topic-metadata">

**Author:** [@miniskar](https://discourse.julialang.org/u/miniskar)\
**Replies:** 1\
**Last updated:** [August 12, 2024, 4:49pm UTC](https://discourse.julialang.org/t/julia-c-pthread-julia-saxpy-with-threads/118097 "2024-08-12T16:49:28Z")

</div>

I am having an C++ library environment where I am supposed to call Julia kernel (example SAXPY) with threading. A minimum work example to illustrate the issue is given below. The Julia main() function calls ‘call\_direc…

---

## [Fixing the Piping/Chaining Issue (Rev 3)](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 89\
**Last updated:** [April 5, 2024, 3:13am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836 "2024-04-05T03:13:54Z")

</div>

Third time’s (hopefully) the charm :wink: Okay so in contrast with my last two proposals (1, 2) this proposal is less preachy, and more “hey check out this crazy cool thing I did and please offer feedback.” Hopefully it…

---

## [Inconsistent CPU utilisation in @threads loops](https://discourse.julialang.org/t/inconsistent-cpu-utilisation-in-threads-loops/110512)

<div class="topic-metadata">

**Author:** [@ysh](https://discourse.julialang.org/u/ysh)\
**Replies:** 20\
**Last updated:** [February 23, 2024, 8:55pm UTC](https://discourse.julialang.org/t/inconsistent-cpu-utilisation-in-threads-loops/110512 "2024-02-23T20:55:43Z")

</div>

Consider a MWE where some moderately-heavy calculations are performed in a parallel loop. Here, I am simulating the calculations by doing eigen: using LinearAlgebra, Random BLAS.set\_num\_threads(1) # turn off BLAS parall…

---

## [Early exit from Threads.@threads](https://discourse.julialang.org/t/early-exit-from-threads-threads/98267)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 0\
**Last updated:** [May 3, 2023, 6:08pm UTC](https://discourse.julialang.org/t/early-exit-from-threads-threads/98267 "2023-05-03T18:08:22Z")

</div>

So I think I follow how Threads.@threads works in typical cases. I.e. this pattern: Threads.@threads for i = 1:N something(i) end where the something(i) will be called N times with concurrency by being scheduled to, …

---

## [Fixing the Piping/Chaining Issue](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue/89654)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 212\
**Last updated:** [January 16, 2023, 5:45am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue/89654 "2023-01-16T05:45:00Z")

</div>

Objective To satisfy Julia’s piping/chaining/currying/partial application problem with an elegant and functional approach worthy and idiomatic of Base Julia. If you want, skip the background reading material straight do…

---

## [Fixing the Piping/Chaining/Partial Application Issue (Rev 2)](https://discourse.julialang.org/t/fixing-the-piping-chaining-partial-application-issue-rev-2/90408)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 40\
**Last updated:** [November 26, 2022, 3:15am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-partial-application-issue-rev-2/90408 "2022-11-26T03:15:25Z")

</div>

Starting this thread anew to avoid confusion, because I changed my mind on which approach I support partway through a long thread (sorry!). It’s also useful to distill some of the last thread’s learnings. Thank you to a…
