Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.3
-
None
Description
Hi,
it seems that there is a different behaviour when compiling in debug or in release mode with the "then" member function of the QFuture class.
The documentation says :
"When the context object is destroyed, cancellation happens immediately. Previous futures in the chain are not cancelled and keep running until they are finished."
In release mode, the future is indeed canceled, but in debug mode an q_assert happens.
I have attached a demo code, showing the issue.
debug compilation output:
r0
ASSERT: "context" in file C:/Qt/6.5.2/mingw_64/include/QtCore/qfuture_impl.h, line 598
release compilation output:
r0
cancelled