You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The multiwait API allows a waiter to wait on multiple events.
It would be very useful if we could make the network API compatible with this API so that a thread can wait on several socket receives, accepts, etc. Callers currently need to create multiple threads to do this. This would be the equivalent of poll or select.
To make the network stack API multiwaiter-compatible, we need to expose a futex.
A few locations where adding this futex would make sense (to be edited when new ideas come):
receive bytes: network_socket_receive, network_socket_receive_preallocated, network_socket_receive_from, and the TLS equivalents tls_connection_receive_preallocated, tls_connection_receive
send bytes: network_socket_send, network_socket_send_to, and the TLS equivalent tls_connection_send
connect to a remote host: network_socket_connect_tcp
accept a connection: network_socket_accept_tcp in the new server API (Add a server API. #39)
The multiwait API allows a waiter to wait on multiple events.
It would be very useful if we could make the network API compatible with this API so that a thread can wait on several socket receives, accepts, etc. Callers currently need to create multiple threads to do this. This would be the equivalent of poll or select.
To make the network stack API multiwaiter-compatible, we need to expose a futex.
A few locations where adding this futex would make sense (to be edited when new ideas come):
network_socket_receive,network_socket_receive_preallocated,network_socket_receive_from, and the TLS equivalentstls_connection_receive_preallocated,tls_connection_receivenetwork_socket_send,network_socket_send_to, and the TLS equivalenttls_connection_sendnetwork_socket_connect_tcpnetwork_socket_accept_tcpin the new server API (Add a server API. #39)