Project

General

Profile

Bug #3735

wtwithqt: triggerUpdate() causes rendering outside the Qt-Thread-Context

Added by Kai Scherrer over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/21/2015
Due date:
% Done:

0%

Estimated time:

Description

This Bug is descibed in http://redmine.emweb.be/boards/2/topics/10075?r=10238#message-10238 and applies to 3.3.4rc1 running on Windows7 with Visual Studio 2013

When I do a Wt::WAbstractItemModel::layoutChanged().emit() followed by an Wt::WApplication::triggerUpdate() in the context of a Wt::WServer::post(), then the resulting rendering is done directly from a Wt-threadpool-context, not by the QtThread-Context of Wt::WQApplication.

In the attached TestCase there is a model created in Wt::WQApplication::create() which asserts, when one of its 'render-functions' are called from another thread as the one which created it.

When the call to triggerUpdate() in DemoModel.cpp (line 183), is enabled then these asserts do fire.


Files

WtThreadingProblem.zip (4.87 KB) WtThreadingProblem.zip Kai Scherrer, 01/21/2015 11:17 AM
WtThreadingProblem.tar.gz (3.77 KB) WtThreadingProblem.tar.gz Kai Scherrer, 01/22/2015 08:54 AM

Also available in: Atom PDF