Feb-27-2017, 07:54 AM
My program does the following:
SQL query results based on GUI (user filled) data is passed to TCPprinter thread in arguments. I'm using threading because I need to check printer(s) state and don't want to freeze the GUI. However GUI will only show status info until the TCPprinter thread is finished. After that user is allowed to enter new data and start printing thread again.
Should I use queue instead and keep my TCPprinter thread running as long as GUI is alive, or is there some better approach?
SQL query results based on GUI (user filled) data is passed to TCPprinter thread in arguments. I'm using threading because I need to check printer(s) state and don't want to freeze the GUI. However GUI will only show status info until the TCPprinter thread is finished. After that user is allowed to enter new data and start printing thread again.
Should I use queue instead and keep my TCPprinter thread running as long as GUI is alive, or is there some better approach?