()
| 3932 | } |
| 3933 | |
| 3934 | async fn get_next_tui_request() -> Json<Option<TuiRequest>> { |
| 3935 | loop { |
| 3936 | let mut queue = TUI_REQUEST_QUEUE.lock().await; |
| 3937 | if let Some(next) = queue.pop_front() { |
| 3938 | return Json(Some(next)); |
| 3939 | } |
| 3940 | drop(queue); |
| 3941 | TUI_REQUEST_NOTIFY.notified().await; |
| 3942 | } |
| 3943 | } |
| 3944 | |
| 3945 | async fn submit_tui_response(Json(body): Json<serde_json::Value>) -> Json<bool> { |
| 3946 | let mut queue = TUI_RESPONSE_QUEUE.lock().await; |
nothing calls this directly
no outgoing calls
no test coverage detected