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