Skip to main content

serve

Function serve 

Source
pub async fn serve(host: Host)
Expand description

Answer messages until stdin closes.

Requests are answered as they finish rather than in the order they arrived: a jev_eval over a hundred cases must not hold up the jev_check behind it, and JSON-RPC matches replies by id. Stdin is read on a blocking thread, since a pipe that never closes would otherwise hold a runtime worker for the life of the process.