Andrew Kelley
bd3c65f752
std.Io.net: partially implement HostName.lookup
2025-10-29 06:20:48 -07:00
Andrew Kelley
668f905243
add some networking
2025-10-29 06:20:48 -07:00
Andrew Kelley
d801a71d29
add std.testing.io
2025-10-29 06:20:48 -07:00
Andrew Kelley
84d60404be
std.Io: delete asyncParallel
2025-10-29 06:20:48 -07:00
Andrew Kelley
7ead86e339
std.Io: fix error handling and asyncParallel docs
2025-10-29 06:20:48 -07:00
Andrew Kelley
f762597724
std.Io: add asyncConcurrent and asyncParallel
2025-10-29 06:20:48 -07:00
Andrew Kelley
ec3e4c00c3
std.Io.EventLoop: add aarch64 support
2025-10-29 06:20:48 -07:00
Andrew Kelley
30be75ca40
std.Io.ThreadPool: fix asyncDetached
2025-10-29 06:20:48 -07:00
Andrew Kelley
f5d8492b1f
std.Io: rename go to asyncDetached
...
it's a better name because it's more descriptive, not a reference, and
hints that it is less common than async
2025-10-29 06:20:48 -07:00
Andrew Kelley
14c3dc4c49
revert std.Thread.Pool for now
...
and move the Io impl to a separate file
2025-10-29 06:20:48 -07:00
Andrew Kelley
fd4dd3befb
update to sync with master
2025-10-29 06:20:48 -07:00
Andrew Kelley
e1cbcecf89
Io: update for new linked list API
2025-10-29 06:20:48 -07:00
Andrew Kelley
4b657d2de5
std.Io: remove @ptrCast workarounds
...
thanks to d53cc5e5b2
2025-10-29 06:20:48 -07:00
Andrew Kelley
c88b8e3c15
std.Io.EventLoop: implement select
2025-10-29 06:20:48 -07:00
Andrew Kelley
f158ec5530
Io.EventLoop: select stub
2025-10-29 06:20:48 -07:00
Andrew Kelley
7aa4062f5c
introduce Io.select and implement it in thread pool
2025-10-29 06:20:48 -07:00
Jacob Young
c4fcf85c43
Io.Condition: implement full API
2025-10-29 06:20:48 -07:00
Jacob Young
3eb7be5cf6
EventLoop: implement detached fibers
2025-10-29 06:20:48 -07:00
Andrew Kelley
0f105a8a10
EventLoop: let the allocator do its job
...
to bucket and free fiber allocations
2025-10-29 06:20:48 -07:00
Jacob Young
08ce000276
EventLoop: fix std.Io.Condition implementation
...
1. a fiber can't put itself on a queue that allows it to be rescheduled
2. allow the idle fiber to unlock a mutex held by another fiber by
ignoring reschedule requests originating from the idle fiber
2025-10-29 06:20:48 -07:00
Jacob Young
e366b13a65
EventLoop: revert incorrect optimization
2025-10-29 06:20:48 -07:00
Andrew Kelley
4063205746
EventLoop: remove broken mechanism for making deinit block on detached
2025-10-29 06:20:48 -07:00
Andrew Kelley
929b616e0f
std.Io.Condition: change primitive to support only one
...
and no timer
2025-10-29 06:20:48 -07:00
Andrew Kelley
8773b63241
EventLoop: take DetachedClosure into account when allocating
2025-10-29 06:20:48 -07:00
Andrew Kelley
266bcfbf2f
EventLoop: implement detached async
...
data races on deinit tho
2025-10-29 06:20:48 -07:00
Jacob Young
f84aca36c3
Io: implement faster mutex
2025-10-29 06:20:48 -07:00
Andrew Kelley
a1c1d06b19
std.Io: add detached async
2025-10-29 06:20:48 -07:00
Andrew Kelley
0d4b358dd8
implement Mutex, Condition, and Queue
2025-10-29 06:20:48 -07:00
Jacob Young
08b609a79f
Io: implement sleep and fix cancel bugs
2025-10-29 06:20:48 -07:00
Jacob Young
5041c9ad9c
EventLoop: implement thread-local queues and cancellation
2025-10-29 06:20:48 -07:00
Andrew Kelley
e7caf3a54c
std.Io: introduce cancellation
2025-10-29 06:20:47 -07:00
Andrew Kelley
a29b2122d2
better API for Io.async
2025-10-29 06:20:47 -07:00
Jacob Young
d958077203
EventLoop: fix futex usage
...
How silly of me to forget that the kernel doesn't implement its own API.
The scheduling is not great, but at least doesn't deadlock or hammer.
2025-10-29 06:20:47 -07:00
Jacob Young
db0dd3a480
EventLoop: get file operations working
...
Something is horribly wrong with scheduling, as can be seen in the
debug output, but at least it somehow manages to exit cleanly...
2025-10-29 06:20:47 -07:00
Andrew Kelley
238de05d2c
WIP
2025-10-29 06:20:47 -07:00
Andrew Kelley
66b0f7e92b
start adding fs functions to std.Io
2025-10-29 06:20:47 -07:00
Andrew Kelley
08bb7c6c88
free freeing wrong amount in thread pool impl
2025-10-29 06:20:47 -07:00
Jacob Young
1493c3b5f3
EventLoop: move context after the async closure
...
This avoids needing to store more sizes and alignments. Only the result
alignment needs to be stored, because `Fiber` is at a fixed zero offset.
2025-10-29 06:20:47 -07:00
Jacob Young
29355ff21c
EventLoop: fix incorrect alignment panic
...
When the previous fiber did not request to be registered as an awaiter,
it may not have actually been a full blown `Fiber`, so only create the
`Fiber` pointer when needed.
2025-10-29 06:20:47 -07:00
Andrew Kelley
4c7c0c4178
update threaded fibers impl to actually storing args
...
sorry, something still not working correctly
2025-10-29 06:20:47 -07:00
Andrew Kelley
31ed2d6715
fix context passing in threaded Io impl
2025-10-29 06:20:47 -07:00
Jacob Young
f1dd06b01f
EventLoop: implement main idle fiber
2025-10-29 06:20:47 -07:00
Jacob Young
9d0f44f08a
EventLoop: add threads
2025-10-29 06:20:47 -07:00
Jacob Young
629a20459d
EventLoop: rewrite context switching
2025-10-29 06:20:47 -07:00
Jacob Young
fe6f1efde4
EventLoop: prepare for threading
2025-10-29 06:20:47 -07:00
Andrew Kelley
4d56267938
demo: single-threaded green threads implementation
2025-10-29 06:20:47 -07:00
Andrew Kelley
cb9f9bf58d
make thread pool satisfy async/await interface
2025-10-29 06:20:47 -07:00
Andrew Kelley
21b7316772
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-29 06:20:47 -07:00
Ryan Liptak
6568f0f75b
Merge pull request #25705 from squeek502/linked-list-remove-docs
...
Document that `remove` of Singly/DoublyLinkedList relies on the node being in the list
2025-10-29 05:11:58 -07:00
Alex Rønne Petersen
b409cdf63f
Elf2: set ELFOSABI_OPENBSD for openbsd
2025-10-29 07:48:42 +01:00