summaryrefslogtreecommitdiffstats
path: root/cmake/QtPublicWindowsHelpers.cmake
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2025-12-05 13:08:43 +0100
committerIvan Solovev <ivan.solovev@qt.io>2025-12-11 14:32:13 +0100
commitcb5cb151476b494b69b1fa702686de28c0e67dee (patch)
treeca858678c7aed550e57dedb6453800d93d954b81 /cmake/QtPublicWindowsHelpers.cmake
parent4dcdb60056833ac42a3bc14804bdc03733f647fe (diff)
Further improve QRandomAccessAsyncFile::close() logic on macOS
Commit 097e6ea3f6ae714658ae87e0c66274ddd09d0fae already reworked the logic to take all the possible callbacks into account. It used m_numChannelsToClose to track the number of active channels and populated this variable based on the number of active operations when close() is called. However, it did not consider one fact - once the operation is finished or cancelled, the channel related to this operation is not closed immediately. So, when close() is called, we might have some open channels from the operations that are in progress AND some open channels from the operations that are cancelled or already finished. We should wait for the close callbacks from these channels as well. This was revealed on CI by the operationsDeletedInProgress() test that was failing occasionally. This patch tries to fix it by changing the way we track the number of channels to close. Instead of populating the variable only when close() is called, we increase it each time the new channel is created, and decrease it once a channel is closed. The fix was verified with a manual test that is equivalent to the failing tst_QRandomAccessAsyncFile::operationsDeletedInProgress(). The manual test was run 100'000 times for each of the operations. Amends 097e6ea3f6ae714658ae87e0c66274ddd09d0fae and e6b26ad1eca555ee1e6b2c4e9b4c7676dc754b04. Fixes: QTBUG-142089 Pick-to: 6.11 Change-Id: I2dcaa3e2ff0e6a7cfcdbddedd1f6d9ecc44d2261 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'cmake/QtPublicWindowsHelpers.cmake')
0 files changed, 0 insertions, 0 deletions