thread names to aid debugging
This commit is contained in:
parent
7e5ea6e065
commit
0030c6d656
@ -45,7 +45,7 @@ class output(object):
|
|||||||
if not self.supports_type(t):
|
if not self.supports_type(t):
|
||||||
# TODO rewrite the output mechanism in a way that avoids producing unnecessary data
|
# TODO rewrite the output mechanism in a way that avoids producing unnecessary data
|
||||||
logger.warning("dumping output of type %s since it is not supported.", t)
|
logger.warning("dumping output of type %s since it is not supported.", t)
|
||||||
threading.Thread(target=self.pump(read_fn, lambda x: None)).start()
|
threading.Thread(target=self.pump(read_fn, lambda x: None), name="csdr_pump_thread").start()
|
||||||
return
|
return
|
||||||
self.receive_output(t, read_fn)
|
self.receive_output(t, read_fn)
|
||||||
|
|
||||||
@ -773,7 +773,7 @@ class dsp(object):
|
|||||||
logger.debug("restarting since rc = 0, self.running = true, and no modification")
|
logger.debug("restarting since rc = 0, self.running = true, and no modification")
|
||||||
self.restart()
|
self.restart()
|
||||||
|
|
||||||
threading.Thread(target=watch_thread).start()
|
threading.Thread(target=watch_thread, name="csdr_watch_thread").start()
|
||||||
|
|
||||||
audio_type = "hd_audio" if self.isHdAudio() else "audio"
|
audio_type = "hd_audio" if self.isHdAudio() else "audio"
|
||||||
if self.output.supports_type(audio_type):
|
if self.output.supports_type(audio_type):
|
||||||
|
@ -110,7 +110,7 @@ class WritingPipe(Pipe):
|
|||||||
This sends the opening operation off to a background thread. If we were to block the thread here, another pipe
|
This sends the opening operation off to a background thread. If we were to block the thread here, another pipe
|
||||||
may be waiting in the queue to be opened on the opposing side, resulting in a deadlock
|
may be waiting in the queue to be opened on the opposing side, resulting in a deadlock
|
||||||
"""
|
"""
|
||||||
threading.Thread(target=self.open_and_dequeue).start()
|
threading.Thread(target=self.open_and_dequeue, name="csdr_pipe_thread").start()
|
||||||
|
|
||||||
def write(self, data):
|
def write(self, data):
|
||||||
"""
|
"""
|
||||||
|
@ -48,7 +48,7 @@ class Client(ABC):
|
|||||||
# unset the queue object to free shared memory file descriptors
|
# unset the queue object to free shared memory file descriptors
|
||||||
self.multithreadingQueue = None
|
self.multithreadingQueue = None
|
||||||
|
|
||||||
threading.Thread(target=mp_passthru).start()
|
threading.Thread(target=mp_passthru, name="connection_mp_passthru").start()
|
||||||
|
|
||||||
def send(self, data):
|
def send(self, data):
|
||||||
try:
|
try:
|
||||||
|
@ -158,7 +158,7 @@ class DspManager(csdr.output):
|
|||||||
|
|
||||||
write = writers[t]
|
write = writers[t]
|
||||||
|
|
||||||
threading.Thread(target=self.pump(read_fn, write)).start()
|
threading.Thread(target=self.pump(read_fn, write), name="dsp_pump_{}".format(t)).start()
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.dsp.stop()
|
self.dsp.stop()
|
||||||
|
@ -49,7 +49,7 @@ class Map(object):
|
|||||||
loops = 0
|
loops = 0
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
|
|
||||||
threading.Thread(target=removeLoop, daemon=True).start()
|
threading.Thread(target=removeLoop, daemon=True, name="map_removeloop").start()
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
def broadcast(self, update):
|
def broadcast(self, update):
|
||||||
|
@ -32,7 +32,7 @@ class ServiceOutput(output, metaclass=ABCMeta):
|
|||||||
parser = self.getParser()
|
parser = self.getParser()
|
||||||
parser.setDialFrequency(self.frequency)
|
parser.setDialFrequency(self.frequency)
|
||||||
target = self.pump(read_fn, parser.parse)
|
target = self.pump(read_fn, parser.parse)
|
||||||
threading.Thread(target=target).start()
|
threading.Thread(target=target, name="service_output_receive").start()
|
||||||
|
|
||||||
|
|
||||||
class WsjtServiceOutput(ServiceOutput):
|
class WsjtServiceOutput(ServiceOutput):
|
||||||
|
@ -171,7 +171,7 @@ class SdrSource(ABC):
|
|||||||
logger.debug("shut down with RC={0}".format(rc))
|
logger.debug("shut down with RC={0}".format(rc))
|
||||||
self.monitor = None
|
self.monitor = None
|
||||||
|
|
||||||
self.monitor = threading.Thread(target=wait_for_process_to_end)
|
self.monitor = threading.Thread(target=wait_for_process_to_end, name="source_monitor")
|
||||||
self.monitor.start()
|
self.monitor.start()
|
||||||
|
|
||||||
retries = 1000
|
retries = 1000
|
||||||
|
Loading…
Reference in New Issue
Block a user