On Wed, July 24, 2019 at 7:02 PM, Fabien COELHO wrote:
> > but I have one question. Is it better adding any check like if(maxsock
> > != -1) before the select?
> >
> > else /* no explicit delay, select without timeout */
> > {
> > nsocks = select(maxsock + 1, &input_mask, NULL, NULL, NULL); }
>
> I think that it is not necessary because this case cannot happen: If some
> clients are still running (remains > 0), they are either sleeping, in
> which case there would be a timeout, or they are waiting for something
> from the server, otherwise the script could be advanced further so there
> would be something else to do for the thread.
Ah, I understand.
> We could check this by adding "Assert(maxsock != -1);" before this select,
> but I would not do that for a released version.
Yeah I also imagined that we can use Assert, but ah, it's released version.
I got it. Thanks for telling that.
So I'll mark this ready for committer.
--
Yoshikazu Imai