Re: [PATCH] move sleep_millisec to git-compat-util.h
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 25, 2020, 23:12 UTC
- Message-ID
- <xmqqy2ipav5k.fsf@gitster.c.googlers.com>
- In-Reply-To
- <018301d6c371$37bf6820$a73e3860$@nexbridge.com>
"Randall S. Becker" <rsbecker@nexbridge.com> writes:
Show 8 quoted lines
> I just chatted with my team and we think that sticking with the existing > poll call is probably better in the long term. We are planning to try to get > git to work using PUT threads - but that is a longer project for a whole > slew of reasons. It involves pulling all or most of the FLOSS stuff out, or > making that configurable to use FLOSS when not using threads and not using > FLOSS when using threads. It might be useful, however, to use usleep() > instead of poll(NULL) when threading is used on most platforms as it is a > more effective way of context switching between threads than select().
Yeah, if usleep() is portable enough, that would probably be the ideal direction to go.