Andrew Kelley
9a62dc4d89
revert std.Thread.Pool for now
...
and move the Io impl to a separate file
2025-10-02 16:30:59 -07:00
Andrew Kelley
fdd59f0fa7
update to sync with master
2025-10-02 16:30:59 -07:00
Andrew Kelley
0c1e102e97
std.Io.EventLoop: implement select
2025-10-02 16:30:59 -07:00
Andrew Kelley
4a3ef0f779
introduce Io.select and implement it in thread pool
2025-10-02 16:30:59 -07:00
Jacob Young
6ba65ca972
Io.Condition: implement full API
2025-10-02 16:30:59 -07:00
Andrew Kelley
e5b2df0c9b
std.Io.Condition: change primitive to support only one
...
and no timer
2025-10-02 16:30:59 -07:00
Jacob Young
0f083f24ff
Io: implement faster mutex
2025-10-02 16:30:59 -07:00
Andrew Kelley
0086d315f5
std.Io: add detached async
2025-10-02 16:30:59 -07:00
Andrew Kelley
5508b4c887
implement Mutex, Condition, and Queue
2025-10-02 16:30:59 -07:00
Jacob Young
b01244d225
Io: implement sleep and fix cancel bugs
2025-10-02 16:30:59 -07:00
Jacob Young
b37126bc08
EventLoop: implement thread-local queues and cancellation
2025-10-02 16:30:59 -07:00
Andrew Kelley
c278830592
std.Io: introduce cancellation
2025-10-02 16:30:59 -07:00
Andrew Kelley
be68b28b9b
start adding fs functions to std.Io
2025-10-02 16:30:59 -07:00
Andrew Kelley
5be0d0b48c
free freeing wrong amount in thread pool impl
2025-10-02 16:30:59 -07:00
Andrew Kelley
acd02e978b
fix context passing in threaded Io impl
2025-10-02 16:30:59 -07:00
Andrew Kelley
cfb3581fb9
make thread pool satisfy async/await interface
2025-10-02 16:30:59 -07:00
Andrew Kelley
63c554d5a7
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-10-02 16:30:59 -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