mirror of
https://github.com/saymrwulf/uhd.git
synced 2026-05-16 21:10:10 +00:00
host: remove deprecated setName usage
As of Python3.10, setName has been deprecated in favor of using name directly as a property
This commit is contained in:
parent
e40121441e
commit
5ededca7db
2 changed files with 4 additions and 5 deletions
|
|
@ -468,10 +468,10 @@ def main():
|
|||
rx_thread = threading.Thread(
|
||||
target=benchmark_rx_rate,
|
||||
args=(usrp, rx_streamer, args.random, quit_event, rx_statistics),
|
||||
name="bmark_rx_stream",
|
||||
)
|
||||
threads.append(rx_thread)
|
||||
rx_thread.start()
|
||||
rx_thread.setName("bmark_rx_stream")
|
||||
|
||||
# Create a dictionary for the RX statistics
|
||||
# Note: we're going to use this without locks, so don't access it from the main thread until
|
||||
|
|
@ -488,18 +488,18 @@ def main():
|
|||
tx_thread = threading.Thread(
|
||||
target=benchmark_tx_rate,
|
||||
args=(usrp, tx_streamer, args.random, quit_event, tx_statistics),
|
||||
name="bmark_tx_stream",
|
||||
)
|
||||
threads.append(tx_thread)
|
||||
tx_thread.start()
|
||||
tx_thread.setName("bmark_tx_stream")
|
||||
|
||||
tx_async_thread = threading.Thread(
|
||||
target=benchmark_tx_rate_async_helper,
|
||||
args=(tx_streamer, quit_event, tx_async_statistics),
|
||||
name="bmark_tx_helper",
|
||||
)
|
||||
threads.append(tx_async_thread)
|
||||
tx_async_thread.start()
|
||||
tx_async_thread.setName("bmark_tx_helper")
|
||||
|
||||
# Sleep for the required duration
|
||||
# If we have a multichannel test, add some time for initialization
|
||||
|
|
|
|||
|
|
@ -32,9 +32,8 @@ class WaveformGenerator:
|
|||
if not self._streamer:
|
||||
raise RuntimeError("No streamer defined!")
|
||||
self._run = True
|
||||
self._thread = threading.Thread(target=self._worker)
|
||||
self._thread = threading.Thread(target=self._worker, name="cal_tx")
|
||||
self._thread.start()
|
||||
self._thread.setName("cal_tx")
|
||||
|
||||
def stop(self):
|
||||
"""Stop the transmitter."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue