客户端多线程请求服务器线程状态TIMED_WAITING

时间:2018-12-25 09:02:05

标签: spring-cloud-gateway

Apache jmeter线程组发布和获取请求spring-cloud-gateway-sample示例项目路径/ testfun发布请求以获取formData服务器线程TIMED_WAITING

单独的获取或发布请求不会TIMED_WAITING

@Bean
public RouterFunction<ServerResponse> testFunRouterFunction() {
    RouterFunction<ServerResponse> route = RouterFunctions.route(
            RequestPredicates.path("/testfun"),
            request -> ServerResponse.ok().body(BodyInserters.fromObject("hello")))
            .filter((serverRequest, handlerFunction) -> {
                    if(serverRequest.method()== HttpMethod.POST) {
                        serverRequest.formData().block(); //Will be TIMED_WAITING

                    }
                return Mono.empty();
            });
    return route;
}

服务器线程将全部为TIMED_WAITING

0 个答案:

没有答案