-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Background pause #13245
Comments
this may not be the real cause, the real part is already non-blocking https://github.com/arvidn/libtorrent/blob/3ced76ecf12d9bfe4ce53b77e53a1f7484331560/src/torrent_handle.cpp#L281 |
Thanks for the detailed post. This is more of the kind of helpful, thought out post I expected from the get-go. I'm glad we're on the same page now. As mentioned, the current way libtorrent pauses torrents is already non-blocking, qBittorrent just uses that under the hood. Any chance you can post some profiling info/debugging information to narrow down the real culprit of the blockage? |
I looked at the logs, qBt does not seem to write any additional info. I can’t imagine a way how I can provide profiling info without installing MSVS, compiling libtorrent, boost, openSSL, zlib etc. I see here only two options:
I think, the first option is a great idea. |
I suspect application-level logging wouldn't help much in this case, this is the kind of problem that is better solved (or at all) with a profiler, debugger, and such tools. If you're not willing to help solve your own problem, no one else is going to do it for you. Installing the developer tools on Windows can be a pain, but you can just grab a Windows 10 dev VM, which is ready to go: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/. Compiling qBittorrent from source on Windows is pretty tiresome if you follow the wiki procedure, but it is significantly easier if you use
The first attempt at such a thing is here: #13070, but it's taking a while to merge. In the meantime, occasionally other users other users provide builds of recent commits (for example: #2904 (comment)). |
In response to: #13237.
Thanks for your response, however, I ought to disagree with you in the sentence "qBittorrent/libtorrent obviously use multi-threading already."
When a user presses the pause button, the QAction causes the following function:
But, Bittorrent does not use multithreading in this case. The freeze can be caused by many things, since the pause function produces some actions.
The function should look like this:
Perhaps, multithreading is unnecessary in this case, but background pause would be good:
Of course, the use of
QThread::create(Function &&f)
is better, but it requires more than one line of code.I would post it to the case I opened, but comments were closed.
The text was updated successfully, but these errors were encountered: