Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jersey-dev] Writing resposne without blocking thread

If your resource returns CompletionStage<T> by e. g. return CompletableFuture.supplyAsync(() -> …your code…, POOL) then you even can use your own thread pool to prevent blocking of the I/O calls. Not that this is not necessary when running in application servers, as they already provide customizable pool size for that purpose. For example, in Payara you simply can have separate pool sizes for TCP and http, so it is irrelevant that Jersey is running in the http pool by default.

-Markus

 

 

Von  jersey-dev [mailto:jersey-dev-bounces@xxxxxxxxxxx] Im Auftrag von Asaf Mesika
Gesendet: Sonntag, 14. Mai 2023 15:26
An: jersey-dev@xxxxxxxxxxx
Betreff: [jersey-dev] Writing resposne without blocking thread

 

Hi,

 

I was wondering if Jersey supports an implementation of AsyncResponse.resume() in which when it takes a thread from the pool, it doesn't block it for the I/O calls - i.e. like Jetty or Jetty supports writing an object without blocking a thread for the I/O itself.

 

Thanks,

 

Asaf

 


Back to the top