summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthreadpool.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-18 18:12:02 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-10-01 06:28:22 +0200
commit2fea6bbe8e822b3fb59a7f74c0165e7a8aeb727a (patch)
tree84ffe7ebb730b61468e07265bd0eb37471fbe83f /src/corelib/thread/qthreadpool.cpp
parent49d94bbb41cede41ebe97004a84b2e3a4f5936e5 (diff)
Allocate synchronously delivered QWSI events on the stack
If we know at compile time that a window system interface event will be delivered synchronously, then we can allocate it on the stack avoid a new/delete. This is the case for a large number of events. Add a template helper class that is specialized for the three delivery types to allocate the event object on the stack if possible, and on the heap otherwise. We can use that factory in the event handler functions, via a helper function, to replace the heap-allocation and call to handleWindowSystemEvent. Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Change-Id: If92fc91ef07f3542a37dfb0fed20e15a3d19b8f0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/corelib/thread/qthreadpool.cpp')
0 files changed, 0 insertions, 0 deletions