Skip to content
  • Sona Kurazyan's avatar
    Add a way of notifying QFutureWatcher when pause is in effect · 2f15927f
    Sona Kurazyan authored
    
    
    Because setting QFutureInterface to paused state does not mean that
    the computations that are already in progress will stop immediately,
    it may be useful to get notified when pause actually takes effect.
    
    Introduced the QFutureWatcher::suspended() signal, to be emitted when
    there are no more computations in progress, and no more result ready
    or progress reporting signals will be emitted, i.e. when pause took
    effect. Added {QFuture, QFutureWatcher}::isSuspended() methods for
    checking if pause took effect.
    
    QtConcurrent will now to send QFutureCallOutEvent::Suspended event
    when the state is paused and there are no more active threads.
    
    [ChangeLog][QtCore][QFutureWatcher] Added a new QFutureWatcher::suspended()
    signal, to be emitted when pause took effect, meaning that there are no
    more computations in progress. Added {QFuture, QFutureWatcher}::isSuspended()
    methods for checking if pause took effect.
    
    Fixes: QTBUG-12152
    Change-Id: I88f2ad24d800cd6293dec63977d45bd35f9a09f0
    Reviewed-by: default avatarJarek Kobus <jaroslaw.kobus@qt.io>
    2f15927f