User thread lock instead of boolean to ensure only one concurrent sending thread, introduced wait flag for repetier printers