Merge "Add thread safety annotations to frontend" into main