FreeBSD Bugzilla – Attachment 126987 Details for
Bug 170766
High CPU load caused by net-p2p/libtorrent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 506 bytes, created by
yamagi
on 2012-08-19 11:10:08 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
yamagi
Created:
2012-08-19 11:10:08 UTC
Size:
506 bytes
patch
obsolete
>--- src/torrent/utils/thread_base.cc.orig >+++ src/torrent/utils/thread_base.cc >@@ -88,6 +88,8 @@ thread_base::stop_thread_wait() { > > void > thread_base::interrupt() { >+ int sleep_length = 0; >+ > __sync_fetch_and_or(&m_flags, flag_no_timeout); > > while (is_polling() && has_no_timeout()) { >@@ -96,7 +98,8 @@ thread_base::interrupt() { > if (!(is_polling() && has_no_timeout())) > return; > >- usleep(0); >+ usleep(sleep_length); >+ sleep_length = std::min(sleep_length + 50, 1000); > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 170766
: 126987