I am using qextserialport library for my serial communication. The thing i do is write to serial every 3 seconds. I have used timer that timeouts every 3 seconds and calls a slot for writing. Also i write to serial port on some button clicks. But sometimes my gui freezes may be due to collision between these write commands, not sure though. How do i synchronize this. is there any way of doing it?