RFR: Invoke implDeregister() at wakeup()

joeyleeeeeee97 duke at openjdk.java.net
Wed Apr 13 02:01:39 UTC 2022


On Thu, 31 Mar 2022 13:52:13 GMT, Miao Zheng <duke at openjdk.java.net> wrote:

> A virtual thread may park itself and register an event of EPoll when it invoke an operation of NioSocket. If the Inputstream or NioSocket closed, the call stack is like:
> 
> Poller::wakeup
> Poller::stopPoll
> NioSocketImpl.close()
> ···
> 
> 
> I have a question that do we need invoke implDeregister() before unpark virtual thread?

Hi, I think  `implDeregister` is unnecessary now because all Poller implementation are registering with ONE SHOT options like `EPOLLONESHOT`, which will automatically remove fd once events received.

-------------

PR: https://git.openjdk.java.net/loom/pull/128


More information about the loom-dev mailing list