RFR 8237858: PlainSocketImpl.socketAccept() handles EINTR incorrectly

Vyom Tiwari vyommani at gmail.com
Sat Jul 4 15:24:44 UTC 2020


Hi Martin
Thanks for the review, I will try to address your review comment.

I wanted to write a simple test case for this issue but it is getting more
complex.

Thanks,
Vyom

On Sat, Jul 4, 2020 at 8:14 PM Martin Buchholz <martinrb at google.com> wrote:

> On Fri, Jul 3, 2020 at 11:12 PM Alan Bateman <Alan.Bateman at oracle.com>
> wrote:
>
> > - "service" isn't a great name for the Executor. Also you can make use
> > of try-finally, e.g.
> > ExecutorService executor = Executors.newFixedThreadPool(1);
> > try { ... } finally { executor.shutdown(); }
>
> If you want to do this structured-concurrency-style, you should wait
> for all the threads you started to complete (they might block!).
> shutdown is not enough - you also want awaitTermination.
>
> We have a PoolCleaner utility in test/jdk/java/util/concurrent/tck/ to
> help do this.
>
>  try (PoolCleaner cleaner = cleaner(p)) {
>


-- 
Thanks,
Vyom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20200704/aa20e792/attachment-0001.htm>


More information about the net-dev mailing list