pkoretic / recurse

Qt based micro web framework with middleware design
MIT License
21 stars 2 forks source link

multithreading #21

Closed pkoretic closed 8 years ago

pkoretic commented 8 years ago

add multiple threads support

standard multithreaded implementation http://doc.qt.io/qt-5/qtnetwork-threadedfortuneserver-example.html

alternatively investigate if we could process middlewares after request is received in a thread pool http://doc.qt.io/qt-5/qtconcurrent.html

benchmark both and avoid mutexes, use signals and events instead

pkoretic commented 8 years ago

http://www.bogotobogo.com/Qt/Qt5_QTcpServer_QThreadPool_Multithreaded_Client_Server.php

pkoretic commented 8 years ago

To avoid more complexity for the user we recommend using QtConcurrent as shown in examples sqlite_nonblocking and postgres_nonblocking in the future plan is to have all blocking operations (file, database) wrapped in threaded implementations