redpipe icon indicating copy to clipboard operation
redpipe copied to clipboard

block thread

Open pipinet opened this issue 6 years ago • 1 comments

in the redpipe-example-helloworld

@Path("/")
public class HelloResource {
	@GET
	public String hello() {
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return "Hello World";
	}
}

will need 10 second when i send concurrent 10 requests...

pipinet avatar Feb 16 '19 06:02 pipinet

Yes, you should not block the request threads.

FroMage avatar Feb 26 '19 08:02 FroMage