Add names to all the threads

This commit is contained in:
Jaime van Kessel 2019-11-01 16:20:42 +01:00
parent b3bf77524b
commit c2e6116983
No known key found for this signature in database
GPG key ID: 3710727397403C91
3 changed files with 5 additions and 5 deletions

View file

@ -61,7 +61,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
self._all_baud_rates = [115200, 250000, 500000, 230400, 57600, 38400, 19200, 9600]
# Instead of using a timer, we really need the update to be as a thread, as reading from serial can block.
self._update_thread = Thread(target = self._update, daemon = True)
self._update_thread = Thread(target = self._update, daemon = True, name = "USBPrinterUpdate")
self._last_temperature_request = None # type: Optional[int]
self._firmware_idle_count = 0
@ -212,7 +212,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
self._serial.close()
# Re-create the thread so it can be started again later.
self._update_thread = Thread(target=self._update, daemon=True)
self._update_thread = Thread(target=self._update, daemon=True, name = "USBPrinterUpdate")
self._serial = None
## Send a command to printer.