multithreading: additional mutex mxq2 has been added to avoid segmentation fault while processing while() loop with processMessages()