feat: implement await match for multi-future select with heterogeneou…#9
Open
feat: implement await match for multi-future select with heterogeneou…#9
Conversation
…s suppression Warning now only fires when ALL case arms have guards and there is no default arm. Includes line:col in warning output. -Wno-await-match-guards suppresses it. Also replaces yield with sleep(1) in await_match.tin to exercise real blocking.
ioutil: add FdReader/FdWriter adapters to eliminate duplicated _fd_impl functions; all operations now have a single implementation. write_string and write_bytes now retry partial writes consistently for all backends. udp: mirror TCP structure with Server.accept(max_n) returning Conn; Conn carries received datagram in .data and peer address in .host/.port; write is overloaded for both [byte] and *byte (AsyncWriter); host string now constructed in C via TinString* to remove manual buffer management from Tin code. examples: udp_echo_server simplified to 7 lines; unix_echo_server drops unused 'use io'. docs: add array pattern matching to 02-control-flow, await match to 14-fibers, new stdlib/networking.md covering io/ioutil/tcp/udp/unix.
…, remove tin_head binary recv_from_impl used mem::malloc(65536) and mem::free to manage the datagram receive buffer. Replace with let buf [byte; 65536] which is a fixed-size array managed by the coroutine frame - no manual allocation or free needed. Also removes the accidentally committed tin_head ELF binary (6.8 MB).
- Updated UDP echo server to read and echo back strings instead of raw bytes. - Improved regex match handling by adding begin offsets for captured groups. - Refactored memory management in regex functions to use `mem::malloc` and `mem::free`. - Added support for 8-bit type formatting in documentation. - Enhanced error handling in regex compilation and execution. Signed-off-by: Ariel Simulevski <ariel@simulevski.at>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…s types