Compare commits
3 Commits
64365123ed
...
4e895bc711
Author | SHA1 | Date |
---|---|---|
Cœur | 4e895bc711 | |
Pooyan Khanjankhani | 821a6816ef | |
Cœur | 90b82825b1 |
|
@ -1836,21 +1836,13 @@ tr_peer_stat* tr_peerMgrPeerStats(tr_torrent const* tor, size_t* setme_count)
|
||||||
auto* const ret = new tr_peer_stat[n];
|
auto* const ret = new tr_peer_stat[n];
|
||||||
|
|
||||||
// TODO: re-implement as a callback solution (similar to tr_sessionSetCompletenessCallback) in case present call to run_in_session_thread is causing hangs when the peers info window is displayed.
|
// TODO: re-implement as a callback solution (similar to tr_sessionSetCompletenessCallback) in case present call to run_in_session_thread is causing hangs when the peers info window is displayed.
|
||||||
auto done_promise = std::promise<void>{};
|
auto const now = tr_time();
|
||||||
auto done_future = done_promise.get_future();
|
auto const now_msec = tr_time_msec();
|
||||||
tor->session->run_in_session_thread(
|
std::transform(
|
||||||
[&peers, &ret, &done_promise]()
|
std::begin(peers),
|
||||||
{
|
std::end(peers),
|
||||||
auto const now = tr_time();
|
ret,
|
||||||
auto const now_msec = tr_time_msec();
|
[&now, &now_msec](auto const* peer) { return peer_stat_helpers::get_peer_stats(peer, now, now_msec); });
|
||||||
std::transform(
|
|
||||||
std::begin(peers),
|
|
||||||
std::end(peers),
|
|
||||||
ret,
|
|
||||||
[&now, &now_msec](auto const* peer) { return peer_stat_helpers::get_peer_stats(peer, now, now_msec); });
|
|
||||||
done_promise.set_value();
|
|
||||||
});
|
|
||||||
done_future.wait();
|
|
||||||
|
|
||||||
*setme_count = n;
|
*setme_count = n;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -150,7 +150,7 @@ Get a file list for the current torrent(s)
|
||||||
.It Fl g Fl -get Ar all | file-index | files
|
.It Fl g Fl -get Ar all | file-index | files
|
||||||
Mark file(s) for download.
|
Mark file(s) for download.
|
||||||
.Ar all
|
.Ar all
|
||||||
marks all all of the torrent's files for downloading,
|
marks all of the torrent's files for downloading,
|
||||||
.Ar file-index
|
.Ar file-index
|
||||||
adds a single file to the download list, and
|
adds a single file to the download list, and
|
||||||
.Ar files
|
.Ar files
|
||||||
|
|
Loading…
Reference in New Issue