address PR comments
diff --git a/apps/bench.py b/apps/bench.py
index 6a7aadd..bb30c33 100644
--- a/apps/bench.py
+++ b/apps/bench.py
@@ -55,6 +55,7 @@
from bumble.transport import open_transport_or_link
import bumble.rfcomm
import bumble.core
+from bumble.utils import AsyncRunner
# -----------------------------------------------------------------------------
@@ -322,7 +323,7 @@
self.expected_packet_index = packet_index + 1
if packet_flags & PACKET_FLAG_LAST:
- asyncio.create_task(
+ AsyncRunner.run(
self.packet_io.send_packet(
struct.pack('>bbI', PacketType.ACK, packet_flags, packet_index)
)
@@ -403,7 +404,7 @@
self.latencies.append(latency)
print(
color(
- f'@@@ Received ACK [{packet_index}], latency={latency:.2f}ms',
+ f'<<< Received ACK [{packet_index}], latency={latency:.2f}ms',
'green',
)
)
@@ -422,7 +423,7 @@
self.done.set()
return
- asyncio.create_task(self.send_next_ping())
+ AsyncRunner.run(self.send_next_ping())
# -----------------------------------------------------------------------------
@@ -471,7 +472,7 @@
self.expected_packet_index = packet_index + 1
- asyncio.create_task(
+ AsyncRunner.run(
self.packet_io.send_packet(
struct.pack('>bbI', PacketType.ACK, packet_flags, packet_index)
)