Version 2.3.4

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-08 20:02:14 +02:00
parent 6fbeb63a97
commit f5f589b33c

View File

@ -1,4 +1,5 @@
import _thread
# import _thread
from concurrent.futures import ThreadPoolExecutor
import logging
import time
@ -41,7 +42,9 @@ class AsyncAdvertiser(object):
def start_advertising(self):
if self._config['personality']['advertise']:
_thread.start_new_thread(self._adv_poller, ())
# _thread.start_new_thread(self._adv_poller, ())
with ThreadPoolExecutor(max_workers=4) as executor:
executor.submit(self._adv_poller)
grid.set_advertisement_data(self._advertisement)
grid.advertise(True)