Results 1 to 2 of 2

Thread: QRunnable - how to cancel execution?

  1. #1
    Join Date
    Nov 2009
    Location
    US, Midwest
    Posts
    215
    Thanks
    62
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QRunnable - how to cancel execution?

    I did not find a way to cancel a thread of execution when using QThreadPool::globalInstance()->start. The only way to cancel seems to be setting a flag inside the execution context.

    Question - how to cancel execution when QThreadPool::globalInstance()->start (instance derived from QRunnable)?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QRunnable - how to cancel execution?

    You can't cancel a runnable.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. How to "sleep" inside QRunnable-derived class?
    By TorAn in forum Qt Programming
    Replies: 6
    Last Post: 19th November 2009, 22:03
  2. QThreadPool and QRunnable
    By jimc1200 in forum Qt Programming
    Replies: 3
    Last Post: 6th May 2009, 10:43
  3. Processo Ok or Cancel in a QFileDialog
    By gt.beta2 in forum Newbie
    Replies: 8
    Last Post: 20th February 2009, 17:53
  4. Cancel last user ever
    By 1111 in forum Qt Programming
    Replies: 2
    Last Post: 28th November 2008, 17:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.