Andrew Kelley
38152c2d1c
revert std.Thread.Pool for now
...
and move the Io impl to a separate file
2025-07-20 10:38:39 -07:00
Andrew Kelley
80d4655bb1
update to sync with master
2025-07-20 10:38:39 -07:00
Andrew Kelley
13e30c4fd2
std.Io.EventLoop: implement select
2025-07-20 10:38:39 -07:00
Andrew Kelley
0f67ea4fa4
introduce Io.select and implement it in thread pool
2025-07-20 10:38:39 -07:00
Jacob Young
7b5886118d
Io.Condition: implement full API
2025-07-20 10:38:39 -07:00
Andrew Kelley
74969d1c40
std.Io.Condition: change primitive to support only one
...
and no timer
2025-07-20 10:38:39 -07:00
Jacob Young
f3553049cb
Io: implement faster mutex
2025-07-20 10:38:39 -07:00
Andrew Kelley
ebf92042e3
std.Io: add detached async
2025-07-20 10:38:39 -07:00
Andrew Kelley
a7790bd32e
implement Mutex, Condition, and Queue
2025-07-20 10:38:38 -07:00
Jacob Young
012ef81b8b
Io: implement sleep and fix cancel bugs
2025-07-20 10:38:38 -07:00
Jacob Young
1fbc251ccd
EventLoop: implement thread-local queues and cancellation
2025-07-20 10:38:38 -07:00
Andrew Kelley
988f58341b
std.Io: introduce cancellation
2025-07-20 10:38:38 -07:00
Andrew Kelley
d4ff3745d5
start adding fs functions to std.Io
2025-07-20 10:38:38 -07:00
Andrew Kelley
db499b82b5
free freeing wrong amount in thread pool impl
2025-07-20 10:38:38 -07:00
Andrew Kelley
ad3c5f0292
fix context passing in threaded Io impl
2025-07-20 10:38:38 -07:00
Andrew Kelley
6ae18714b7
make thread pool satisfy async/await interface
2025-07-20 10:38:38 -07:00
Andrew Kelley
5b2f54fc80
introduce std.Io interface
...
which is planned to have all I/O operations in the interface, but for
now has only async and await.
2025-07-20 10:38:38 -07:00
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