def end_request(request_id):
 with _request_states_lock:
  request_state = _request_states[request_id]
 request_state.end_request()
 with _request_states_lock:
  del _request_states[request_id]

def end_request ( request_id ) : with _request_states_lock : request_state = _request_states [ request_id ] request_state . end_request ( ) with _request_states_lock : del _request_states [ request_id ]
ends the request with the provided request id .