


In headless and multithreaded applications, the wait method can be called (in this case, waitForReadyRead()) to suspend the calling thread until the operation has completed. The synchronous (blocking) alternative.When the data is sent to the serial port, the QSerialPort class emits the bytesWritten() signal. For example, the write() method returns immediately. The QSerialPort class emits a signal when the operation is finished. Operations are scheduled and performed when the control returns to the Qt event loop.

The asynchronous (non-blocking) alternative.QSerialPort supports two programming alternatives: Blocking Master shows how to create an application for a serial interface using the synchronous API of QSerialPort in a worker thread.
