diff options
author | romner <roman@skotnica.com> | 2023-06-08 20:24:01 +0200 |
---|---|---|
committer | romner <roman@skotnica.com> | 2023-06-08 20:24:01 +0200 |
commit | d8ebbe1181346234edce4dfa030c3b63ab025942 (patch) | |
tree | eeb2844ceac28f6802fb8683fa8a6fd66c40d117 | |
parent | be1098915169cfb6a87c5fbad7b90cdb078b8257 (diff) |
Join NVML PCIe threads only if PCIe TX/RX is supported by GPU
-rw-r--r-- | src/linux/btop_collect.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 14b7a1a..754414d 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -1177,7 +1177,13 @@ namespace Gpu { // nvTimer.stop_rename_reset("Nv pcie thread join"); //? Join PCIE TX/RX threads - pcie_tx_thread.join(); pcie_rx_thread.join(); + if constexpr(is_init) { // there doesn't seem to be a better way to do this, but this should be fine considering it's just 2 lines + pcie_tx_thread.join(); + pcie_rx_thread.join(); + } else if (gpus_slice[i].supported_functions.pcie_txrx) { + pcie_tx_thread.join(); + pcie_rx_thread.join(); + } } return true; |