[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn commit: r1580914 - /subversion/trunk/subversion/libsvn_subr/io.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Mon, 24 Mar 2014 18:07:30 +0100

> -----Original Message-----
> From: julianfoad_at_apache.org [mailto:julianfoad_at_apache.org]
> Sent: maandag 24 maart 2014 17:45
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1580914 -
> /subversion/trunk/subversion/libsvn_subr/io.c
> Author: julianfoad
> Date: Mon Mar 24 16:45:26 2014
> New Revision: 1580914
> URL: http://svn.apache.org/r1580914
> Log:
> * subversion/svn/notify.c
> (svn_io_sleep_for_timestamps): Simplify, eliminating a return path that
> looked
> like a potential source of bugs but was probably in fact safe.

As noted on IRC, this patch can make us wait for the next... next second... by determining to what second we wait later.

I don't see why this patch improves the current behavior of this function.

The if case you removed checked if the time to wait for is in the past, which may happen for various reasons... E.g.g when the stat operation is somehow slow... or because the OS-scheduler paged us out and only returned later.

In these cases we now just wait one second extra...

Originally we always waited (<= 1.5), but then we made use of the delay time to determine if we really had to wait. Doing this with this code made sure the new code was not *more expensive* than the old check.

But now the code is updated to still wait the old long time... after we spend time determining whether we should wait at all.

Received on 2014-03-24 18:08:23 CET

This is an archived mail posted to the Subversion Dev mailing list.