FroMage / redpipe

Redpipe Web Framework
Apache License 2.0
70 stars 10 forks source link

block thread #52

Open pipinet opened 5 years ago

pipinet commented 5 years ago

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...

FroMage commented 5 years ago

Yes, you should not block the request threads.