Commit graph

18 commits

Author SHA1 Message Date
Andrew Kelley
1639fcea43 de-genericify SinglyLinkedList
by making it always intrusive, we make it a more broadly useful API, and
avoid binary bloat.
2025-04-03 14:55:04 -07:00
Jacob Young
8c8dfb35f3 x86_64: fix crashes compiling the compiler and tests 2025-01-16 20:47:30 -05:00
Andrew Kelley
862266514a Revert "Enable thread_pool function to throw errors (#20260)"
This reverts commit d346d074eb.

I would like a chance to review this, please.
2024-11-11 14:07:07 -08:00
ippsav
d346d074eb
Enable thread_pool function to throw errors (#20260)
* std.ThreadPool: allow error union return type

* allow noreturn in Pool.zig
2024-11-11 15:34:24 -06:00
mochalins
c8e0095362 test: Add spawn behavior test 2024-07-09 21:15:29 -04:00
mochalins
6446596ba1 fix: Update spawn's' runFn signature 2024-07-09 21:15:29 -04:00
Jacob Young
65ced4a334 Compilation: put supported codegen backends on a separate thread
(There are no supported backends.)
2024-07-08 11:00:38 -04:00
Jacob Young
bdae01ab04 InternPool: implement and use thread-safe list for extra and limbs 2024-07-07 22:59:52 -04:00
Jacob Young
383cffbfae InternPool: temporarily disable multi-threaded behavior
This reduces the cost of the new data structure until the multi-threaded
behavior is actually used.
2024-07-07 22:59:52 -04:00
Jacob Young
cda716ecc4 InternPool: implement thread-safe hash map 2024-07-07 22:59:52 -04:00
Jacob Young
525f341f33 Zcu: introduce PerThread and pass to all the functions 2024-07-07 22:59:52 -04:00
Andrew Kelley
a72292513e add std.Thread.Pool.spawnWg
This function accepts a WaitGroup parameter and manages the reference
counting therein. It also is infallible.

The existing `spawn` function is still handy when the job wants to
further schedule more tasks.
2024-05-03 20:58:02 -07:00
GethDW
db96ad4a16 std: fix Thread.Pool.spawn
`@alignCast` was required for args with greater alignment than that of a pointer.
2024-04-19 13:49:06 -07:00
Jacob Young
eb723a4070 Update uses of @fieldParentPtr to use RLS 2024-03-30 20:50:48 -04:00
Jacob Young
e409afb79b Update uses of @fieldParentPtr to pass a pointer type 2024-03-30 20:50:48 -04:00
Littleote
3331c5e7af Free threads in std.Thread.Pool.init only with pool.join
Free the allocated threads in the initialization of a thread pool only with pool.join instead of additionally calling allocator.free causing free to be called twice.

Resolves #18643
2024-01-22 11:24:35 -08:00
Andrew Kelley
cb09470063 zig build: add a -j<N> option for limiting concurrency 2023-03-15 10:48:12 -07:00
Andrew Kelley
5b90fa05a4 extract ThreadPool and WaitGroup from compiler to std lib 2023-03-15 10:48:12 -07:00
Renamed from src/ThreadPool.zig (Browse further)