I can answer some of these questions.
all libtorrents logic, including network and disk I / O, runs in separate threads. Thus, in the end, the problem of “blocking” is not so great. Assuming you mean libtorrent functions that are not returned immediately.
Some operations are guaranteed to be returned immediately, functions that do not return any state or information. However, the functions that do return something must be synchronized with the Libtorrent of the main thread, and if it is under heavy load (especially when embedding in debug mode with invariant checks and without optimization) this synchronization can be noticeable, especially when manufacturing many of them , and often.
There are ways to use libtorrent that are more asynchronous in nature, and continuous efforts are made to minimize the need for synchronized functions. For example, instead of requesting the status of all torrents individually, you can subscribe to torrent status updates. Asynchronous notifications are returned via pop_alerts ().
Will it interfere with the twisted epic; I can’t say for sure, but this does not seem very likely.
I do not think that it is very necessary to interact with libtorrent through a different level of threads, since all work is already being done in separate threads.
Arvid source share