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

Using a non-zero timeout in svn_ra_svn__input_waiting()

From: Ph. Marek <philipp.marek_at_bmlv.gv.at>
Date: 2006-06-06 13:47:48 CEST

Hello everybody!

Please take a look in subversion/libsvn_ra_svn/marshal.c.

There you'll find this part (around line 126):
        svn_boolean_t svn_ra_svn__input_waiting(svn_ra_svn_conn_t *conn,
                                                apr_pool_t *pool)
        {
          apr_pollfd_t pfd;
          int n;
        
          if (conn->sock)
            {
              pfd.desc_type = APR_POLL_SOCKET;
              pfd.desc.s = conn->sock;
            }
          else
            {
              pfd.desc_type = APR_POLL_FILE;
              pfd.desc.f = conn->in_file;
            }
          pfd.p = pool;
          pfd.reqevents = APR_POLLIN;
        #ifndef AS400
HERE> return ((apr_poll(&pfd, 1, &n, 0) == APR_SUCCESS) && n);
        #else
          /* OS400 requires a pool argument for apr_poll(). */
HERE> return ((apr_poll(&pfd, 1, &n, 0, pool) == APR_SUCCESS) && n);
        #endif
        }

May I suggest using a non-zero timeout (eg. 1000us) or possibly -1 (infinite)?
I only ask because it's a bit inconvinient currently:
        $ top
          PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
         4038 flip 18 0 62144 44m 3196 R 53.4 8.8 6:54.89 svnserve

Thank you!

Regards,

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 6 13:49:15 2006

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