I want to use Asio and Qt together ? each of them have a two method that must be called and each of them are blocking for example : Asio has io_service.run() and qt has QCoreApplication.exec() if I run one of them then another cannot be run.
I have two solutions:
- create another thread and call io_service.run() from that.
- create a timer with 100ms cycle and call io_service.poll() from same thread that call QCoreApplication.exec().
These solutions are correct?