https://bugs.documentfoundation.org/show_bug.cgi?id=161168

            Bug ID: 161168
           Summary: WebDav UCP - has (fairly) busy-loop in a thread
                    refreshing locks
           Product: LibreOffice
           Version: 24.8.0.0 alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: framework
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: michael.me...@collabora.com

It appears that:

ucb/source/ucp/webdav-curl/SerfLockStore.cxx

Hasa  thread that wakes up 25 times per second:

        std::this_thread::sleep_for( std::chrono::milliseconds(1000/25) );

to see if some timeouts have expired.

However - the method 'refreshLocks' could easily tell us how long it will be
until we need to refresh another lock; and if we wait/sleep on a condition we
can signal that if new ones are added.

This would make scheduling far more relaxed.

Suggest adding a shortest deadline in milliseconds to wake up again as a return
value from 'refreshLocks()' there and sleeping that long.

=)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to