PIMutex as std::mutex

This commit is contained in:
2020-07-17 11:14:11 +03:00
parent ea624a5111
commit 6f5c864e9f
7 changed files with 130 additions and 432 deletions

View File

@@ -164,19 +164,20 @@ public:
tl->content << TileSimple::Row("Quality: " + PIString::fromNumber((int)ds.quality), CellFormat());
}
void updatePeerInfo() {
bool pm = daemon_.lockedPeers();
// bool pm = daemon_.lockedPeers();
screen->lock();
daemon_.lock();
peers_tl->content.clear();
addrs_tl->content.clear();
peerinfo_tl->content.clear();
peermap_tl->content.clear();
peers_tl->content << TileList::Row("this | 0 | 0 | " + PIString::fromNumber(daemon_.allPeers().size_s()) +
" [em = " + PIString::fromBool(daemon_.lockedEth()) + ", "
"mm = " + PIString::fromBool(daemon_.lockedMBcasts()) + ", "
"sm = " + PIString::fromBool(daemon_.lockedSends()) + ", "
"ms = " + PIString::fromBool(daemon_.lockedMCSends()) + ", "
"pm = " + PIString::fromBool(pm) + "]", CellFormat());
peers_tl->content << TileList::Row("this | 0 | 0 | " + PIString::fromNumber(daemon_.allPeers().size_s())
// + " [em = " + PIString::fromBool(daemon_.lockedEth()) + ", "
// "mm = " + PIString::fromBool(daemon_.lockedMBcasts()) + ", "
// "sm = " + PIString::fromBool(daemon_.lockedSends()) + ", "
// "ms = " + PIString::fromBool(daemon_.lockedMCSends()) + ", "
// "pm = " + PIString::fromBool(pm) + "]"
, CellFormat());
piForeachC(PIPeer::PeerInfo &p , daemon_.allPeers())
peers_tl->content << TileList::Row(p.name + " | d = " + PIString::fromNumber(p.dist) +
" | p = " + PIString::fromNumber(p.ping()) +