eclipse-ee4j / grizzly

Grizzly
https://eclipse-ee4j.github.io/grizzly
Other
148 stars 69 forks source link

About "TemporarySelectorIO" in "NIOTransport" class. #2130

Closed tcmot closed 1 year ago

tcmot commented 3 years ago

Hi,all I'm reading the source code, I have a question.

Set a "temporary selector pool".

Like this: temporarySelectorIO.setSelectorPool( new TemporarySelectorPool(selectorProvider, selectorPoolSize)); The two classes associated with this class are as follows: TemporarySelectorReader TemporarySelectorWriter

I want to know when "TemporarySelectorPool" will be used.

I found that when "Transportcontext. Isblocking()=true", "TemporarySelectorPool" will be used.

Why?

What does that mean?

I can't understand what the purpose is.

If there is any offence, it is not my intention.

Thanks.